goose icon indicating copy to clipboard operation
goose copied to clipboard

Client-side Callbacks when a Job executes

Open olttwa opened this issue 2 years ago • 1 comments

Allow clients to register for a callback when a Job is executed Callback can contain either execution result (success scenario) or exception (failure scenario)

olttwa avatar Aug 04 '22 08:08 olttwa

cc @bsless

olttwa avatar Aug 04 '22 08:08 olttwa

Questions

  1. 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?
  2. 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?
    1. A is easier to implement, won't affect performance of Application and will solve most use-cases
    2. B is more difficult to implement, will affect performance of Application
    3. I suggest we do A. Users wanting B will have to add an API to their Application and call it from the Callback function in Worker

olttwa avatar Feb 17 '23 12:02 olttwa