← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jameinel/maas/ignore_results into lp:maas

 

John A Meinel has proposed merging lp:~jameinel/maas/ignore_results into lp:maas.

Commit message:
Pass ignore_result=True to all current celery tasks.

With celery, you are meant to fire off a job, and then grab the
result object and wait for it. The design of all current jobs is
that they just trigger and you never wait for the result.

If you don't ignore the results, then the queues build up forever
and stay alive because they wait for someone to read the result.


Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jameinel/maas/ignore_results/+merge/128204

See commit message
-- 
https://code.launchpad.net/~jameinel/maas/ignore_results/+merge/128204
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jameinel/maas/ignore_results into lp:maas.
=== modified file 'src/provisioningserver/tasks.py'
--- src/provisioningserver/tasks.py	2012-10-04 05:49:09 +0000
+++ src/provisioningserver/tasks.py	2012-10-05 10:05:26 +0000
@@ -64,7 +64,7 @@
 celery_config = app_or_default().conf
 
 
-@task
+@task(ignore_result=True)
 def refresh_secrets(**kwargs):
     """Update the worker's knowledge of various secrets it needs.
 
@@ -135,13 +135,13 @@
     # TODO: signal to webapp that it worked.
 
 
-@task
+@task(ignore_result=True)
 def power_on(power_type, **kwargs):
     """Turn a node on."""
     issue_power_action(power_type, 'on', **kwargs)
 
 
-@task
+@task(ignore_result=True)
 def power_off(power_type, **kwargs):
     """Turn a node off."""
     issue_power_action(power_type, 'off', **kwargs)
@@ -340,7 +340,7 @@
     boot_images.report_to_server()
 
 
-@task
+@task(ignore_result=True)
 def update_node_tags(tag_name, tag_definition):
     """Update the nodes for a new/changed tag definition.