goose
goose copied to clipboard
Client-side Callbacks when a Job executes
Allow clients to register for a callback when a Job is executed Callback can contain either execution result (success scenario) or exception (failure scenario)
cc @bsless
Questions
- Callbacks make more sense in context of a batch. Should we only reserve them for Batches(#105) or allow individual Jobs to have callbacks as well?
- Should a callback be
(A) a simple function that's provided when creating a Batch
or(B) 2-way communication between Application<>Worker over the message broker
?-
A
is easier to implement, won't affect performance of Application and will solve most use-cases -
B
is more difficult to implement, will affect performance of Application - I suggest we do
A
. Users wantingB
will have to add an API to their Application and call it from the Callback function in Worker
-