mosquito-cr / mosquito

A background task runner for crystal applications supporting periodic (CRON) and manually queued jobs
MIT License
227 stars 24 forks source link

implements before hooks #76

Closed robacarp closed 2 years ago

robacarp commented 2 years ago

Before hooks allow splitting a jobs execution dynamics into reusable modules -- throttling, etc.

Adapted from https://github.com/luckyframework/avram/blob/ac281f490a85283eaf8b74fd23357dd70a6d7f22/src/avram/callbacks.cr#L122-L152

Thank you @paulcsmith for the reference code. 🍰

Fixes #69

paulcsmith commented 2 years ago

You're welcome! Glad it helped