mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-12 18:44:14 +00:00
queue the process instance AFTER unlocking it, do not set celery worker concurrency to 12, log already locked error in celery workers for debugging
This commit is contained in:
parent
d4e0fc69fd
commit
4d6358b0e7
@ -10,4 +10,4 @@ set -o errtrace -o errexit -o nounset -o pipefail
|
||||
export SPIFFWORKFLOW_BACKEND_CELERY_ENABLED=true
|
||||
export SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER_IN_CREATE_APP=false
|
||||
|
||||
poetry run celery -A src.spiffworkflow_backend.background_processing.celery_worker worker --loglevel=info -c 12
|
||||
poetry run celery -A src.spiffworkflow_backend.background_processing.celery_worker worker --loglevel=info
|
||||
|
@ -38,10 +38,13 @@ def celery_task_process_instance_run(process_instance_id: int, task_guid: str |
|
||||
future_task.completed = True
|
||||
db.session.add(future_task)
|
||||
db.session.commit()
|
||||
if task_runnability == TaskRunnability.has_ready_tasks:
|
||||
queue_process_instance_if_appropriate(process_instance)
|
||||
except ProcessInstanceIsAlreadyLockedError:
|
||||
pass
|
||||
if task_runnability == TaskRunnability.has_ready_tasks:
|
||||
queue_process_instance_if_appropriate(process_instance)
|
||||
except ProcessInstanceIsAlreadyLockedError as exception:
|
||||
current_app.logger.info(
|
||||
f"Could not run process instance with worker: {current_app.config['PROCESS_UUID']} - {proc_index}. Error was:"
|
||||
f" {str(exception)}"
|
||||
)
|
||||
except Exception as e:
|
||||
db.session.rollback() # in case the above left the database with a bad transaction
|
||||
error_message = (
|
||||
|
Loading…
x
Reference in New Issue
Block a user