diff --git a/celery/__manifest__.py b/celery/__manifest__.py index 7e69ea7..845331f 100644 --- a/celery/__manifest__.py +++ b/celery/__manifest__.py @@ -4,7 +4,7 @@ 'name': 'Celery', 'summary': 'Celery (Distributed Task Queue)', 'category': 'Extra Tools', - 'version': '0.27', + 'version': '17.0', 'description': """Execute Odoo methods by Celery worker tasks.""", 'author': 'Nova Code', 'website': 'https://www.novacode.nl', diff --git a/celery/models/celery_task.py b/celery/models/celery_task.py index 2609b2c..43ce5b1 100644 --- a/celery/models/celery_task.py +++ b/celery/models/celery_task.py @@ -283,7 +283,7 @@ def apply_call_task(): # Closure uses several variables from enslosing scope. db_registry = model_registry.Registry.new(dbname) call_task = False - with api.Environment.manage(), db_registry.cursor() as cr: + with db_registry.cursor() as cr: env = api.Environment(cr, user_id, {}) Task = env['celery.task'] try: @@ -299,7 +299,8 @@ def apply_call_task(): call_task = False if call_task: - with api.Environment.manage(), db_registry.cursor() as cr: + + with db_registry.cursor() as cr: env = api.Environment(cr, user_id, {}) Task = env['celery.task'] if not scheduled_date: # if the task is not scheduled for a later time @@ -308,7 +309,8 @@ def apply_call_task(): if transaction_strategy == 'immediate': apply_call_task() else: - self._cr.after('commit', apply_call_task) + self._cr.commit() + apply_call_task() def _transaction_strategies(self): transaction_strategies = self.env['celery.task.setting']._fields['transaction_strategy'].selection diff --git a/celery/views/celery_task_setting_views.xml b/celery/views/celery_task_setting_views.xml index 52ccb43..90f3c37 100644 --- a/celery/views/celery_task_setting_views.xml +++ b/celery/views/celery_task_setting_views.xml @@ -49,7 +49,9 @@ License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) --> - + @@ -63,10 +65,14 @@ License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) -->

A task seems Stuck when it's still in state Started or Retry, after certain elapsed seconds.

- + - + @@ -77,7 +83,9 @@ License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) --> - + @@ -86,7 +94,9 @@ License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) --> - + diff --git a/celery/views/celery_task_views.xml b/celery/views/celery_task_views.xml index 476cc26..f4e1a6a 100644 --- a/celery/views/celery_task_views.xml +++ b/celery/views/celery_task_views.xml @@ -35,7 +35,8 @@ License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) -->
@@ -44,7 +45,7 @@ License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) --> - + @@ -61,18 +62,23 @@ License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) --> - + -
+ invisible="state not in ['RETRY', 'RETRYING', 'FAILURE'] or not result" + > +

No Retry/Failure has occurred on this moment.

Update the information by refreshing this view (button above).

- + @@ -87,16 +93,19 @@ License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html) --> + invisible="not retry and not countdown" + > + invisible="not retry_countdown_setting != 'ADD_SECS' or not retry" + /> + invisible="not retry_countdown_setting != 'MUL_RETRIES_SECS' or not retry" + /> diff --git a/celery/views/res_config_settings_views.xml b/celery/views/res_config_settings_views.xml index 1142568..752977f 100644 --- a/celery/views/res_config_settings_views.xml +++ b/celery/views/res_config_settings_views.xml @@ -1,29 +1,30 @@ - - + res.config.settings.celery.view.form res.config.settings - -
-

Celery

-
-
-
-
-
-
-
-
-
-
+ + + + + + + + + + + + + Settings + res.config.settings + form + inline + {'module': 'celery', 'bin_size': False} +