添加fsm 任务
Showing
1 changed file
with
8 additions
and
3 deletions
... | @@ -41,7 +41,7 @@ from apps.doc.models import ( | ... | @@ -41,7 +41,7 @@ from apps.doc.models import ( |
41 | IDBCRecords, | 41 | IDBCRecords, |
42 | Configs, | 42 | Configs, |
43 | ) | 43 | ) |
44 | from celery_compare.tasks import compare | 44 | from celery_compare.tasks import compare, fsm_compare |
45 | 45 | ||
46 | 46 | ||
47 | class Command(BaseCommand, LoggerMixin): | 47 | class Command(BaseCommand, LoggerMixin): |
... | @@ -2014,8 +2014,13 @@ class Command(BaseCommand, LoggerMixin): | ... | @@ -2014,8 +2014,13 @@ class Command(BaseCommand, LoggerMixin): |
2014 | self.log_base, task_str, res_obj.id)) | 2014 | self.log_base, task_str, res_obj.id)) |
2015 | # 触发比对 | 2015 | # 触发比对 |
2016 | try: | 2016 | try: |
2017 | # pass | 2017 | fsm_activited = getattr(res_obj, 'fsm_activited') |
2018 | compare.apply_async((doc.application_id, business_type, None, res_obj.id, | 2018 | if fsm_activited: |
2019 | fsm_compare.apply_async((doc.application_id, business_type, None, res_obj.id, is_ca, True), | ||
2020 | queue='queue_compare') | ||
2021 | else: | ||
2022 | # pass | ||
2023 | compare.apply_async((doc.application_id, business_type, None, res_obj.id, | ||
2019 | is_ca, True), queue='queue_compare') | 2024 | is_ca, True), queue='queue_compare') |
2020 | except Exception as e: | 2025 | except Exception as e: |
2021 | self.online_log.error( | 2026 | self.online_log.error( | ... | ... |
-
Please register or sign in to post a comment