launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #29800
[Merge] ~cjwatson/launchpad:charm-appserver-crontab into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:charm-appserver-crontab into launchpad:master.
Commit message:
charm: Add datedir2amqp cron job to launchpad-appserver
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/439407
This matches production. The launchpad-layers update adds crontab handling support.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:charm-appserver-crontab into launchpad:master.
diff --git a/charm/launchpad-admin/charmcraft.yaml b/charm/launchpad-admin/charmcraft.yaml
index 3d97113..7e58370 100644
--- a/charm/launchpad-admin/charmcraft.yaml
+++ b/charm/launchpad-admin/charmcraft.yaml
@@ -35,7 +35,7 @@ parts:
after:
- ols-layers
source: https://git.launchpad.net/launchpad-layers
- source-commit: "01a23c1cbc3d2cdf009f28a704f4d5f6a228c5b4"
+ source-commit: "ead45e3e5f7bbf21e81de102ffee6f98cbbfd317"
source-submodules: []
source-type: git
plugin: dump
diff --git a/charm/launchpad-appserver/charmcraft.yaml b/charm/launchpad-appserver/charmcraft.yaml
index ac46e62..aa99dd3 100644
--- a/charm/launchpad-appserver/charmcraft.yaml
+++ b/charm/launchpad-appserver/charmcraft.yaml
@@ -35,7 +35,7 @@ parts:
after:
- ols-layers
source: https://git.launchpad.net/launchpad-layers
- source-commit: "01a23c1cbc3d2cdf009f28a704f4d5f6a228c5b4"
+ source-commit: "ead45e3e5f7bbf21e81de102ffee6f98cbbfd317"
source-submodules: []
source-type: git
plugin: dump
diff --git a/charm/launchpad-appserver/reactive/launchpad-appserver.py b/charm/launchpad-appserver/reactive/launchpad-appserver.py
index 9c23aa4..99ef7f6 100644
--- a/charm/launchpad-appserver/reactive/launchpad-appserver.py
+++ b/charm/launchpad-appserver/reactive/launchpad-appserver.py
@@ -8,6 +8,7 @@ from multiprocessing import cpu_count
from charmhelpers.core import hookenv, host, templating
from charms.launchpad.base import (
config_file_path,
+ configure_cron,
configure_lazr,
get_service_config,
lazr_config_files,
@@ -130,6 +131,7 @@ def configure():
)
configure_gunicorn(config)
configure_logrotate(config)
+ configure_cron(config, "crontab.j2")
restart_type = None
if helpers.any_file_changed(
diff --git a/charm/launchpad-appserver/templates/crontab.j2 b/charm/launchpad-appserver/templates/crontab.j2
new file mode 100644
index 0000000..e0a7a06
--- /dev/null
+++ b/charm/launchpad-appserver/templates/crontab.j2
@@ -0,0 +1,7 @@
+TZ=UTC
+MAILTO={{ cron_mailto }}
+
+# Catch up with publishing OOPSes that were temporarily spooled to disk due
+# to RabbitMQ being unavailable.
+*/15 * * * * {{ code_dir }}/bin/datedir2amqp --exchange oopses --host {{ rabbitmq_host }} --username {{ rabbitmq_username }} --password {{ rabbitmq_password }} --vhost {{ rabbitmq_vhost }} --repo {{ oopses_dir }} --key ""
+
diff --git a/charm/launchpad/charmcraft.yaml b/charm/launchpad/charmcraft.yaml
index 41d3f2f..7980d0e 100644
--- a/charm/launchpad/charmcraft.yaml
+++ b/charm/launchpad/charmcraft.yaml
@@ -35,7 +35,7 @@ parts:
after:
- ols-layers
source: https://git.launchpad.net/launchpad-layers
- source-commit: "01a23c1cbc3d2cdf009f28a704f4d5f6a228c5b4"
+ source-commit: "ead45e3e5f7bbf21e81de102ffee6f98cbbfd317"
source-submodules: []
source-type: git
plugin: dump