reserve and generate callbacks#540
reserve and generate callbacks#540jdcourcol wants to merge 4 commits intoopenbraininstitute:mainfrom
Conversation
|
This is what I mentioned this morning. |
app/endpoints/task_launch.py
Outdated
| ), | ||
| ) | ||
| def task_launch_endpoint( | ||
| async def task_launch_endpoint( |
There was a problem hiding this comment.
I doubt we can do async here given that the clients and the rest of the code is sync. Isn't there a sync accounting factory to use?
There was a problem hiding this comment.
you're right. that is true for my previous PR . I think that indeed there is a sync factory for accounting.
There was a problem hiding this comment.
I move to sync factory.
There is a cancel reservation if submit job raises an exception now.
| "config": { | ||
| "url": failure_callback_url, | ||
| "method": "POST", | ||
| }, |
There was a problem hiding this comment.
Should this be made consistent with the accounting_success_callback_url below? Like splitting it into failure_callback_url and failure_payload, since currently I have the parameters directly encoded into the URL.
There was a problem hiding this comment.
ok, I think @eleftherioszisis proposal is to have the parameters in "params" indeed.
There was a problem hiding this comment.
done with the new commit
|
Maybe it is not the scope of this PR, but I just realized that my example notebook |
Implementation reservation and accounting callbacks as in https://github.com/openbraininstitute/launch-system/blob/main/docs/overview.md#task-launching
Activity is created after the reservation though.