This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_relative '../../lib/config/runlist' | |
require_relative '../../lib/config/config' | |
require_relative '../../nutella_lib/framework_core' | |
# Framework bots can access all the parameters they need directly | |
# from the configuration file and the runlist, | |
# to which they have full access to. | |
# Access the config file like so: | |
# Nutella.config['broker'] | |
# Access the runs list like so: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Cretes a Mongo ID form a timestamp | |
// Useful when we want to query a collection on date ranges | |
function idWithTimestamp(timestamp) { | |
// Convert string or unix time date to Date object (otherwise assume timestamp is a date) | |
if ( typeof(timestamp) == 'string' || typeof(timestamp) == 'number' ) { | |
timestamp = new Date(timestamp); | |
} | |
// Convert date object to hex seconds since Unix epoch |