-
Notifications
You must be signed in to change notification settings - Fork 0
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
[BD-32] feat: add async feature to Hooks Extension Framework tooling #8
Conversation
6f4ac40
to
349ff19
Compare
from .exceptions import HookException | ||
from .utils import get_functions_for_pipeline | ||
|
||
log = getLogger(__name__) | ||
|
||
|
||
@shared_task() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something interesting I found in edx-celeryutils was a BaseTask called LoggedTask, wouldn't be useful to have that extra logging?
@@ -24,7 +24,7 @@ def setUp(self): | |||
} | |||
self.pipeline = Mock() | |||
|
|||
@patch("edx_django_utils.hooks.pipeline.get_functions_for_pipeline") | |||
@patch("edx_django_utils.hooks.tasks.get_functions_for_pipeline") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here just changing the pipeline location from pipeline.py to tasks.py
log.exception( | ||
"An error ocurred in trigger_filter while executing `run pipeline` with arguments: %s, %s.", | ||
str(args), | ||
str(kwargs), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this won't be needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes no difference what the pipeline is at this point right?
I mean, we are sure the pipeline object is never the source of this error. It is always the serialization, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should always be serialization. I'll add it to the message!
Description:
This PR allows the Hooks Extension Framework: Pipeline (check out its ADR) to run asynchronously using celery tasks.
JIRA:
XXX-XXXX
Dependencies:
This PR depends on Hooks Extension Framework: Tooling
Merge deadline:
None
Testing instructions:
TODO: make test repository usable for aysnc
Reviewers:
Merge checklist:
Post merge:
finished.
Author concerns: