Projet

Général

Profil

0001-misc-align-jump-checks-with-the-hourly-cron-jobs-381.patch

Frédéric Péters, 03 décembre 2019 13:37

Télécharger (1,84 ko)

Voir les différences:

Subject: [PATCH] misc: align jump checks with the "hourly" cron jobs (#38159)

 wcs/wf/aggregation_email.py | 2 +-
 wcs/wf/jump.py              | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
wcs/wf/aggregation_email.py
156 156
if get_publisher_class():
157 157
    # at 6:00 in the morning, every day but the week end
158 158
    get_publisher_class().register_cronjob(
159
            CronJob(send_aggregation_emails, minutes=[0], hours=[6], weekdays=range(5)))
159
            CronJob(send_aggregation_emails, hours=[6], weekdays=range(5), hourly=True))
160 160

  
wcs/wf/jump.py
19 19
import os
20 20
import sys
21 21

  
22
from django.conf import settings
22 23
from django.utils import six
23 24

  
24 25
from quixote import get_publisher, get_request, redirect
......
302 303

  
303 304
if get_publisher_class():
304 305
    # every JUMP_TIMEOUT_INTERVAL minutes check for expired status jump
305
    # timeouts.
306
    # timeouts; align checks with the "hourly" check defined in
307
    # wcs/qommon/cron.py
308
    minutes = [(x + ord(settings.SECRET_KEY[-1])) % 60
309
               for x in range(0, 60, JUMP_TIMEOUT_INTERVAL)]
306 310
    get_publisher_class().register_cronjob(
307 311
            CronJob(_apply_timeouts,
308 312
                name='evaluate_jumps',
309
                hours=range(24), minutes=range(0, 60, JUMP_TIMEOUT_INTERVAL)))
313
                hours=range(24), minutes=minutes))
310
-