-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/background proc with celery #788
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…/ burnettk essweine
… into feature/background-proc-with-celery # Conflicts: # spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py
…nserting into it w/ burnettk essweine
…oc-with-celery # Conflicts: # spiffworkflow-backend/src/spiffworkflow_backend/routes/process_instances_controller.py
…oc-with-celery # Conflicts: # spiffworkflow-backend/poetry.lock
…nd set its line-length to match ruff w/ burnettk
…oc-with-celery # Conflicts: # spiffworkflow-backend/src/spiffworkflow_backend/api.yml # spiffworkflow-backend/src/spiffworkflow_backend/background_processing/background_processing_service.py # spiffworkflow-backend/src/spiffworkflow_backend/services/authentication_service.py # spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py
… show page and added additional identifier to locking system to isolate celery workers better w/ burnettk
…ography/spiff-arena into feature/background-proc-with-celery
…oc-with-celery # Conflicts: # spiffworkflow-backend/bin/data_migrations/version_1_3.py
…ts on frontend w/ burnettk
…o queue w/ burnettk
… run a process instance over the api w/ burnettk
…n run server locally w/ burnettk
burnettk
approved these changes
Dec 5, 2023
…oc-with-celery # Conflicts: # spiffworkflow-backend/src/spiffworkflow_backend/load_database_models.py
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements #584.
This adds the ability to run background processing with celery using a redis queue.
Main features:
future_task
which contains tasks that have timers on themTo enable, these variables must be set in all backend-related container types:
redis://localhost
redis://localhost
For deployments, a new deployable type (docker container or similar) is generally required for celery workers. This should be configured with environment variables similar to the apscheduler/proc container, but with the following command:
["./bin/start_celery_worker"]
# any number of these containers are fineThe two other container types (that probably already exist in your list of deployables) might have commands like the following:
["poetry", "run", "python", "./bin/start_blocking_appscheduler.py"]
# appscheduler / proc. you can only run one of theseand
["./bin/boot_server_in_docker"]
# api, the default command in the backend Dockerfile. any number of these are fineAdditional notes:
It still uses apscheduler to run periodic tasks, which will mostly check the future_task table and add them to the redis queue if appropriate. This should take significantly less time than processing the waiting and user_input_required tasks that it does now.