edgurgel / verk

A job processing system that just verks! 🧛‍
https://hex.pm/packages/verk
MIT License
721 stars 65 forks source link

Accept a job struct as the argument to perform #194

Closed Psli closed 4 years ago

Psli commented 4 years ago

This allows workers to use any attribute of the job to customize behaviour, e.g. the number of retries or error message.

edgurgel commented 4 years ago

Hey @Psli, this is already possible by using Verk.Worker.current_job() from the perform function: https://github.com/edgurgel/verk/blob/master/lib/verk/worker.ex#L14

The README should probably have some lines about this

Psli commented 4 years ago

@edgurgel thx.