submission-model

Methods

(static) add(id, instanceId, deprecatedId)

Source:
Parameters:
Name Type Description
id string
instanceId string
deprecatedId string

(static) isNew(id, instanceId) → {Promise.<(Error|boolean)>}

Source:

Whether instanceID was submitted successfully before.

To prevent large submissions that were divided into multiple batches from recording multiple times, we use a redis capped list to store the latest 100 instanceIDs This list can be queried to avoid double-counting instanceIDs

Note that edited records are submitted multiple times with different instanceIDs.

Parameters:
Name Type Description
id string
instanceId string
Returns:
Type
Promise.<(Error|boolean)>

(inner) _alreadyRecorded(instanceId, listopt) → {boolean}

Source:
Parameters:
Name Type Attributes Description
instanceId string
list Array.<string> <optional>

List of IDs

Returns:

Whather instanceID already exists in the list

Type
boolean

(inner) _formatter(options, severity, date, elems)

Source:

Formatter function for logger

Parameters:
Name Type Description
options *
severity *
date *
elems Array.<object>

(inner) _getLatestSubmissionIds(key) → {Promise}

Source:
Parameters:
Name Type Description
key string
Returns:
Type
Promise