0001-misc-add-uwsgi-spooler-50723.patch
chrono/utils/spooler.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
# chrono - agendas system |
|
3 |
# Copyright (C) 2021 Entr'ouvert |
|
4 |
# |
|
5 |
# This program is free software: you can redistribute it and/or modify it |
|
6 |
# under the terms of the GNU Affero General Public License as published |
|
7 |
# by the Free Software Foundation, either version 3 of the License, or |
|
8 |
# (at your option) any later version. |
|
9 |
# |
|
10 |
# This program is distributed in the hope that it will be useful, |
|
11 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
# GNU Affero General Public License for more details. |
|
14 |
# |
|
15 |
# You should have received a copy of the GNU Affero General Public License |
|
16 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
debian/chrono.dirs | ||
---|---|---|
1 | 1 |
/etc/chrono |
2 | 2 |
/usr/lib/chrono |
3 | 3 |
/var/lib/chrono/collectstatic |
4 |
/var/lib/chrono/spooler |
|
4 | 5 |
/var/lib/chrono/tenants |
5 | 6 |
/var/log/chrono |
debian/chrono.init | ||
---|---|---|
38 | 38 |
DAEMON_ARGS=${DAEMON_ARGS:-"--pidfile=$PIDFILE |
39 | 39 |
--uid $USER --gid $GROUP |
40 | 40 |
--ini /etc/$NAME/uwsgi.ini |
41 |
--spooler /var/lib/$NAME/spooler/ |
|
41 | 42 |
--daemonize /var/log/uwsgi.$NAME.log"} |
42 | 43 | |
43 | 44 |
# Load the VERBOSE setting and other rcS variables |
debian/chrono.service | ||
---|---|---|
10 | 10 |
Group=%p |
11 | 11 |
ExecStartPre=/usr/bin/chrono-manage migrate_schemas --noinput --verbosity 1 |
12 | 12 |
ExecStartPre=/usr/bin/chrono-manage collectstatic --noinput |
13 |
ExecStart=/usr/bin/uwsgi --ini /etc/%p/uwsgi.ini |
|
13 |
ExecStartPre=/bin/mkdir -p /var/lib/chrono/spooler/%m/ |
|
14 |
ExecStart=/usr/bin/uwsgi --ini /etc/%p/uwsgi.ini --spooler /var/lib/chrono/spooler/%m/ |
|
14 | 15 |
ExecReload=/bin/kill -HUP $MAINPID |
15 | 16 |
KillSignal=SIGQUIT |
16 | 17 |
TimeoutStartSec=0 |
debian/control | ||
---|---|---|
10 | 10 |
Depends: ${misc:Depends}, ${python3:Depends}, |
11 | 11 |
python3-django (>= 1:1.11), |
12 | 12 |
python3-gadjo, |
13 |
python3-requests |
|
13 |
python3-requests, |
|
14 |
python3-uwsgidecorators |
|
14 | 15 |
Recommends: python3-django-mellon |
15 | 16 |
Description: Agendas System (Python 3 module) |
16 | 17 |
debian/uwsgi.ini | ||
---|---|---|
12 | 12 |
chmod-socket = 666 |
13 | 13 |
vacuum = true |
14 | 14 | |
15 |
spooler-processes = 3 |
|
16 |
spooler-python-import = chrono.utils.spooler |
|
15 | 17 |
# every five minutes |
16 | 18 |
cron = -5 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command cancel_events --all-tenants -v0 |
17 | 19 |
cron = -5 -1 -1 -1 -1 /usr/bin/chrono-manage tenant_command send_email_notifications --all-tenants -v0 |
18 |
- |