This is working for me. I have the latest branch head of pulp/pulp:2-master and pulp/pulp_rpm:2-master. I applied the following diff to test it:
diff --git a/server/pulp/server/async/celery_instance.py b/server/pulp/server/async/celery_instance.py
index eab2ea3dd..9b486e8a5 100644
--- a/server/pulp/server/async/celery_instance.py
+++ b/server/pulp/server/async/celery_instance.py
@@ -29,7 +29,7 @@ CELERYBEAT_SCHEDULE = {
},
'monthly_maintenance': {
'task': 'pulp.server.maintenance.monthly.queue_monthly_maintenance',
- 'schedule': timedelta(days=30),
+ 'schedule': timedelta(seconds=60),
'args': tuple(),
},
'download_deferred_content': {
diff --git a/server/pulp/server/maintenance/monthly.py b/server/pulp/server/maintenance/monthly.py
index 58e51f247..365496ea0 100644
--- a/server/pulp/server/maintenance/monthly.py
+++ b/server/pulp/server/maintenance/monthly.py
@@ -10,6 +10,7 @@ def queue_monthly_maintenance():
"""
Create an itinerary for monthly task
"""
+ raise Exception('oh no!')
tags = [action_tag('monthly')]
monthly_maintenance.apply_async(tags=tags)
Then I got the following output upon startup:
kombu.transport.qpid:INFO: Connected to qpid with SASL mechanism ANONYMOUS
celery.beat:INFO: Scheduler: Sending due task monthly_maintenance (pulp.server.maintenance.monthly.queue_monthly_maintenance)
celery.worker.strategy:INFO: Received task: pulp.server.maintenance.monthly.queue_monthly_maintenance[e465c5d5-4385-4dcb-89ff-24013669c252]
celery.app.trace:ERROR: [e465c5d5] (18124-49472) Task pulp.server.maintenance.monthly.queue_monthly_maintenance[e465c5d5-4385-4dcb-89ff-24013669c252] raised unexpected: Exception('oh no!',)
celery.app.trace:ERROR: [e465c5d5] (18124-49472) Traceback (most recent call last):
celery.app.trace:ERROR: [e465c5d5] (18124-49472) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 367, in trace_task
celery.app.trace:ERROR: [e465c5d5] (18124-49472) R = retval = fun(*args, **kwargs)
celery.app.trace:ERROR: [e465c5d5] (18124-49472) File "/home/vagrant/devel/pulp/server/pulp/server/async/tasks.py", line 107, in __call__
celery.app.trace:ERROR: [e465c5d5] (18124-49472) return super(PulpTask, self).__call__(*args, **kwargs)
celery.app.trace:ERROR: [e465c5d5] (18124-49472) File "/usr/lib/python2.7/site-packages/celery/app/trace.py", line 622, in __protected_call__
celery.app.trace:ERROR: [e465c5d5] (18124-49472) return self.run(*args, **kwargs)
celery.app.trace:ERROR: [e465c5d5] (18124-49472) File "/home/vagrant/devel/pulp/server/pulp/server/maintenance/monthly.py", line 13, in queue_monthly_maintenance
celery.app.trace:ERROR: [e465c5d5] (18124-49472) raise Exception('oh no!')
celery.app.trace:ERROR: [e465c5d5] (18124-49472) Exception: oh no!
I am using Celery 4.0.2-3 with python2-celery-4.0.2-3.fc27.noarch
.
Add docs on maintenance jobs
This adds:
https://pulp.plan.io/issues/3887 closes #3887