Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Batch job *Handlers #40

Closed
ghost opened this issue Apr 22, 2022 · 0 comments
Closed

Batch job *Handlers #40

ghost opened this issue Apr 22, 2022 · 0 comments
Labels
Medusa Label for Medusa Issues

Comments

@ghost
Copy link

ghost commented Apr 22, 2022

  • add support for loading *Handler classes into the Awilix container
    • Awiilix container is allowed to have a single instance of each type of handler
    • enable custom batch job types/handlers from plugins by identifying service using BatchJob type
  • create a common interface that batch job handlers implement:

add support for loading *Handler classes into the Awilix container
Awiilix container is allowed to have a single instance of each type of handler
enable custom batch job types/handlers from plugins by identifying service using BatchJob type
create a common interface that batch job handlers implement:
interface {

  /*
  * Used in the API controller to verify that the `context` param is valid
  */
  validateContext()
  
  /*
  *  Method does the actual processing of the job. Should report back on the progress of the operation.
  */
  processJob()
  
  /*
  *  Method performs the completion of the job. Will not be run if `processJob` has already moved the BatchJob to a `complete` status.
  */
  completeJob()

}
@ghost ghost added the Medusa Label for Medusa Issues label Apr 22, 2022
@ghost ghost closed this as completed May 4, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Medusa Label for Medusa Issues
Projects
None yet
Development

No branches or pull requests

0 participants