startup/server

startup/server

Members

(static, constant) loadFileDateFormat :string

Source:

The load/fixture file date format.
Used when dumping and restoring the RadGrad database.

Type:
  • string

Methods

(static) documentCounts() → {Array}

Source:

Returns an Array of numbers, one per loadable collection, indicating the number of documents in that collection.

Returns:

An array of collection document counts.

Type
Array

(static) getRestoreFileAge(loadFileName) → {String}

Source:

Returns a string indicating how long ago the load file was created. Parses the file name string.

Parameters:
Name Type Description
loadFileName

The file name.

Returns:

A string indicating how long ago the file was created.

Type
String

(static) loadDatabase()

Source:

If the database is empty, this function looks up the name of the load file in the settings file,
and if it is specified, then it reads it in and calls define() on its contents in order to load the database.
Console messages are generated when the contents of the load file does not include collections that
this function assumes are present. Conversely, if the load file contains collections not processed with
this file, a string is also printed out.

(static) startupCheckIntegrity()

Source:

Check the integrity of the newly loaded collections; print out problems if any occur.

(static) startupPublicStats()

Source:

Runs the PublicStats generator to collect stats on the database, then sets up a cron job to update the stats
once a day.

(static) totalDocuments() → {Number}

Source:

Returns the total number of documents in the loadable collections.

Returns:

The total number of RadGrad documents in the loadable collections.

Type
Number