```
$ cd puppet-environment
$ bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to update_scheduler_config saatchi
Found host saatchi.internal.softwareheritage.org
Cloning into '/tmp/swh-ocd.nYRyeoUh/environments/production/data/private'...
done.
Cloning into '/tmp/swh-ocd.nYRyeoUh/environments/update_scheduler_config/data/private'...
done.
*** Running octocatalog-diff on host saatchi.internal.softwareheritage.org
I, [2019-02-12T13:55:49.817286 #16048] INFO -- : Catalogs compiled for saatchi.internal.softwareheritage.org
I, [2019-02-12T13:55:50.586013 #16048] INFO -- : Diffs computed for saatchi.internal.softwareheritage.org
diff origin/production/saatchi.internal.softwareheritage.org current/saatchi.internal.softwareheritage.org
*******************************************
File[/etc/softwareheritage/backend/scheduler.yml] =>
parameters =>
content =>
@@ -1,6 +1,5 @@
---
-scheduler:
- cls: local
- args:
- scheduling_db: host=db dbname=softwareheritage-scheduler user=swhscheduler password=swh::deploy::scheduler::db::password
+cls: local
+args:
+ db: host=db dbname=softwareheritage-scheduler user=swhscheduler password=swh::deploy::scheduler::db::password
_
*******************************************
- File[/etc/softwareheritage/scheduler.ini]
*******************************************
+ File[/etc/softwareheritage/scheduler.yml] =>
parameters =>
"ensure": "present"
"group": "swhscheduler"
"mode": "0640"
"notify": ["Service[swh-scheduler-listener]", "Service[swh-scheduler-runner]"]
"owner": "root"
"content": >>>
---
cls: local
args:
db: host=db dbname=softwareheritage-scheduler user=swhscheduler password=swh::deploy::scheduler::db::password
<<<
*******************************************
File[/etc/systemd/system/swh-scheduler-listener.service] =>
parameters =>
content =>
@@ -12,5 +12,5 @@
Group=swhscheduler
Type=simple
-ExecStart=/usr/bin/python3 -m swh.scheduler.celery_backend.listener
+ExecStart=/usr/bin/swh-scheduler --config-file /etc/softwareheritage/scheduler.yml --log-level INFO listener
Restart=always
RestartSec=10
*******************************************
File[/etc/systemd/system/swh-scheduler-runner.service] =>
parameters =>
content =>
@@ -12,5 +12,5 @@
Group=swhscheduler
Type=simple
-ExecStart=/bin/sh -c 'while true; do echo running pending tasks at `/bin/date`...; /usr/bin/python3 -m swh.scheduler.celery_backend.runner; sleep 10; done'
+ExecStart=/usr/bin/swh-scheduler --config-file /etc/softwareheritage/scheduler.yml --log-level INFO runner --period 10
Restart=always
RestartSec=10
*******************************************
Systemd::Unit_file[swh-scheduler-listener.service] =>
parameters =>
content =>
@@ -12,5 +12,5 @@
Group=swhscheduler
Type=simple
-ExecStart=/usr/bin/python3 -m swh.scheduler.celery_backend.listener
+ExecStart=/usr/bin/swh-scheduler --config-file /etc/softwareheritage/scheduler.yml --log-level INFO listener
Restart=always
RestartSec=10
*******************************************
Systemd::Unit_file[swh-scheduler-runner.service] =>
parameters =>
content =>
@@ -12,5 +12,5 @@
Group=swhscheduler
Type=simple
-ExecStart=/bin/sh -c 'while true; do echo running pending tasks at `/bin/date`...; /usr/bin/python3 -m swh.scheduler.celery_backend.runner; sleep 10; done'
+ExecStart=/usr/bin/swh-scheduler --config-file /etc/softwareheritage/scheduler.yml --log-level INFO runner --period 10
Restart=always
RestartSec=10
*******************************************
*** End octocatalog-diff on saatchi.internal.softwareheritage.org
```