Projet

Général

Profil

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

Lauréline Guérin, 18 janvier 2021 16:02

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          | 10 ++++++++++
 4 files changed, 10 insertions(+), 13 deletions(-)
 delete mode 100644 debian/chrono.cron.d
 delete mode 100644 debian/chrono.cron.daily
 delete mode 100644 debian/chrono.cron.hourly
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
# every hour
19
cron = 0 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command clearsessions --all-tenants
20
cron = 0 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command send_booking_reminders --all-tenants
21
cron = 0 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command sync_desks_timeperiod_exceptions --all-tenants
22
# every 01/01
23
cron = 0 0 1 1 -1 /usr/bin/chrono-manage tenant_command anonymize_bookings --all-tenants
24

  
15 25
master = true
16 26
enable-threads = true
17 27
harakiri = 120
18
-