Skip to content

Commit

Permalink
Run layman_util.update_related_publications_after_change after each s…
Browse files Browse the repository at this point in the history
…uccessful celery chain end
  • Loading branch information
index-git committed May 14, 2021
1 parent 2dfe9e4 commit 17f020d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/layman/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from flask import current_app
from celery.contrib.abortable import AbortableAsyncResult

from layman import settings, common
from layman import settings, common, util as layman_util
from layman.common import redis as redis_util

REDIS_CURRENT_TASK_NAMES = f"{__name__}:CURRENT_TASK_NAMES"
Expand Down Expand Up @@ -37,6 +37,7 @@ def task_postrun(workspace, publication_type, publication_name, task_id, task_na
module = importlib.import_module(module_name)
method = getattr(module, method_name)
method(workspace, publication_type, publication_name)
layman_util.update_related_publications_after_change(workspace, publication_type, publication_name)
elif task_state == 'FAILURE':
chain_info = get_publication_chain_info_dict(workspace, publication_type, publication_name)
if chain_info is not None:
Expand Down

0 comments on commit 17f020d

Please sign in to comment.