Configuration¶
Configuration is controlled through environmental variables. Default values are provided below.
Calculations (adselect.stats.const)¶
-
adselect.stats.const.NEW_BANNERS_IMPRESSION_CUTOFF= 100000¶ Limit new banners.
-
adselect.stats.const.NEW_BANNERS_MIX= 50¶ Approximate percentage of new banners in proposed banners list.
-
adselect.stats.const.NEW_BANNERS_POOL_SIZE_FACTOR= 4¶ When choosing random amount of new banners, we can define the size of the pool of available new banners,
-
adselect.stats.const.RECALCULATE_TASK_SECONDS_INTERVAL= 5¶ Wait with recalculation of scores.
-
adselect.stats.const.SELECTED_BANNER_MAX_AMOUNT= 100¶ The amount of returned banners.
Database (adselect.db.const)¶
-
adselect.db.const.MONGO_DB_HOST= 'localhost'¶ MongoDB database host, ie. database host for ADSELECT application.
Environmental variable override: ADSELECT_MONGO_DB_HOST
-
adselect.db.const.MONGO_DB_NAME= 'adselect'¶ MongoDB database name, ie. database name for ADSELECT application.
Environmental variable override: ADSELECT_MONGO_DB_NAME
-
adselect.db.const.MONGO_DB_PORT= 27017¶ MongoDB port, ie. database connection port for AdUser application.
Environmental variable override: ADSELECT_MONGO_DB_PORT
Interface (adselect.iface.const)¶
-
adselect.iface.const.INVALID_OBJECT= -32010¶ JSONRPC error code for invalid data objects
-
adselect.iface.const.SERVER_PORT= 8011¶ Twisted TCP port number
Utilities (adselect.contrib.const)¶
-
adselect.contrib.const.LOG_CONFIG_JSON_FILE= None¶ Logging config file (optional), overrides default configuration.
Environmental variable override: ADSELECT_LOG_CONFIG_JSON_FILE
-
adselect.contrib.const.LOG_LEVEL= 'DEBUG'¶ Logging level
Environmental variable override: ADSELECT_LOG_LEVEL
Logging¶
Log messages are by default sent to stdout/stderr.