Projet

Général

Profil

0001-misc-use-uwsgi-to-run-cron-tasks-50018.patch

Lauréline Guérin, 19 janvier 2021 15:05

Télécharger (2,72 ko)

Voir les différences:

Subject: [PATCH] misc: use uwsgi to run cron tasks (#50018)

 debian/chrono.cron.d      |  5 -----
 debian/chrono.cron.daily  |  3 ---
 debian/chrono.cron.hourly |  5 -----
 debian/uwsgi.ini          | 12 ++++++++++++
 4 files changed, 12 insertions(+), 13 deletions(-)
debian/chrono.cron.d
1
MAILTO=root
2

  
3
0   0 1 1 * chrono /usr/bin/chrono-manage tenant_command sync_desks_timeperiod_exceptions_from_settings --all-tenants -v0
4
*/5 * * * * chrono /usr/bin/chrono-manage tenant_command cancel_events --all-tenants -v0
5
*/5 * * * * chrono /usr/bin/chrono-manage tenant_command send_email_notifications --all-tenants -v0
debian/chrono.cron.daily
1
#! /bin/sh
2

  
3
/sbin/runuser -u chrono /usr/bin/chrono-manage -- tenant_command anonymize_bookings --all-tenants
debian/chrono.cron.hourly
1
#! /bin/sh
2

  
3
/sbin/runuser -u chrono /usr/bin/chrono-manage -- tenant_command clearsessions --all-tenants
4
/sbin/runuser -u chrono /usr/bin/chrono-manage -- tenant_command sync_desks_timeperiod_exceptions --all-tenants
5
/sbin/runuser -u chrono /usr/bin/chrono-manage -- tenant_command send_booking_reminders --all-tenants
debian/uwsgi.ini
12 12
chmod-socket = 666
13 13
vacuum = true
14 14

  
15
# every five minutes
16
cron = -5 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command cancel_events --all-tenants -v0
17
cron = -5 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command send_email_notifications --all-tenants -v0
18
# hourly
19
cron = 1 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command clearsessions --all-tenants
20
cron = 1 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command send_booking_reminders --all-tenants
21
cron = 1 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command sync_desks_timeperiod_exceptions --all-tenants
22
# daily
23
cron = 2 4 -1 -1 -1 /usr/bin/chrono-manage tenant_command anonymize_bookings --all-tenant
24
# every 01/01 at 1:1
25
cron = 1 1 1 1 -1 /usr/bin/chrono-manage tenant_command sync_desks_timeperiod_exceptions_from_settings --all-tenants -v0
26

  
15 27
master = true
16 28
enable-threads = true
17 29
harakiri = 120
18
-