utils.datelock

There is a special mechanism to avoid the Wetterturnier backend to compute or re-compute historical tournaments. This feature has been added due to unknown or only partially known changes in the judingclass (how the points have been computed in the past).

The Configfile has a special datelock entry. Whenever a script is triggered for a certain tournament date (days since 1970-01-01) the datelock() function evaluates whether you are allowed to perform the action or not.

Documentation for this module. More details should be added.

utils.datelock(config, tdate)[source]

To prevent the scripts to re-compute certain things, e.g. the mean bet tips in the archive, this small function is used. Problem: we do not know who was in which group in the past, wherefore the mean bets will get wrong if recomputed.

Parameters:
  • config (dict) – The config list from utils.readconfig().
  • tdate (int) – Date as integer, days sincd 1970-01-01.
Returns:

Returns True if you are allowed to execute the comoputation and false otherwise.

Return type:

bool