The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- (minor breaking) Logs are now emitted from runners with a slighly different source tag. (#152)
For example:
The overseer boot message used to be:
INFO - mosquito.runners.overseer.4315742080: Overseer<4315742080> is starting
Now the message is simply:INFO - mosquito.overseer: starting
- Adds a test backend, which can be used to inspect jobs that were enqueued and the parameters they were enqueued with.
- Job#fail now takes an optional
retry
parameter which defaults to true, allowing a developer to explicitly mark a job as not retry-able during a job run. Additionally ashould_retry
property exists which can be set as well. - Mosquito::Configuration now provides
global_prefix
to change the global Redis namespace prefix, allowing for more than one mosquito app to share a redis instance (thanks @dammer, cf #134).
- PeriodicJobs are now correctly run once per interval in an environment with many workers.
- Running more than ~10 workers no longer causes workers to crash, fixing #137 (cf #138).
- Mosquito is now more broadly compatible with jgaskins redis, swapping 0.7.0 for 0.7, and forward compatible through 0.8. (thanks @rmarronnier)
- Mosquito now more gracefully responds to SIGTERM, fixes #122, cf #123.
- High CPU usage on linux is no longer an issue, fixes #126, cf #128.
- The QueuedJob
params
macro has been replaced withparam
which declares only one parameter at a time. - JobRun#delete now explicitly takes an Int, rather than simply defaulting to 0 (thanks @jwoertink, cf #136).
- removes deprecated Backend.delete(String, Int32), use Backend.delete(String, Int64) instead.
- removes deprecated Queue#length, use Queue#size instead.
- removes option to run the cron scheduler declaratively, it is now always on with a distributed lock.
- Dramatically decreases the time spent listing queues #120
- Replaces #keys with #scan_each to list runners #138
- Provides for multiple executors operating under a single runner #123
- Mosquito::Runner.start now captures the thread with a spin lock again. The new behavior of returning imediately can be achieved by calling #start(spin: false)
- Implements a distributed lock for scheduler coordination. The behavior is opt-in for now, but will become the default in the next release. See #108.
- Provides a helpful error message for most implementation errors dealing with declaring params.
- Mosquito::QueuedJob: the
params
macro has been deprecated in favor ofparam
. See #110. - The deprecated Redis command
rpoplpush
is no longer used. This lifts the minimum redis server requirement up to 6.2.0 and jgaskins redis to > 0.7.0. - Mosquito::Runner.start no longer captures the thread with a spin lock. [DEFECT]
- Mosquito config option
run_cron_scheduler
is no longer present, multiple workers will compete for a distributed lock instead. See #108.
- Jobs can now specify their retry/reschedule logic with the #rescheduleable? and #reschedule_interval methods.
- Job metadata storage engine.
- Jobs can now specify
after
hooks. - Mosquito::Runner now has a
stop
method which halts the runner after completion of any running tasks. See issue #21 and pull #87. - Mosquito config option
run_cron_scheduler
is no longer present, multiple workers will compete for a distributed lock instead.
- The storage backend is now implemented via interface, allowing alternate backends to be implemented.
- The rate limiting functionality is now implemented in a module,
Mosquito::RateLimiter
. See pull #77 for migration details. - ** BREAKING **
Job.job_type
has been replaced withJob.queue_name
. The functionailty is identical but easier to access. See #86. log
statements now properly identify where they're coming from rather than just 'mosquito'. See issue #78 and pull #88.- Mosquito now connects to Redis using a connection pool. See #89
- ** BREAKING **
Mosquito.settings
is nowMosquito.configuration
. While this is technically a public API, it's unlikely anyone is using it for anything. - Mosquito::Runner.start need not be called from a spawn, it will spawn on it's own.
- Runner.idle_wait configuration is deprecated. Instead use Mosquito.configure#idle_wait.
- Built in serializer for Granite models, and the Model type alias. See Serializers in the documentation if the functionality is necessary.
- Mosquito no longer depends on luckyframework/habitat.
- Boolean false can now be specified as the default value for a parameter:
params(name = false)
- #66 Jobs with no parameters can now be enqueued without specifying an empty
params()
. - #65 PeriodicJobs can now specify their run period in months.
The v0 major version is now bugfix-only. Please update to v1.0. v0 will be supported as long as it's feasible to do so.
- Jobs can now specify
before
hooks, which can abort before the perform is triggered. - The Cron scheduler for periodic jobs can now be disabled via Mosquito.configure#run_cron_scheduler
- The list of queues which are watched by the runner can now be configured via Mosquito.configure#run_from.
- Redis shard 2.8.0, removes hash shims which are no longer needed. Thanks @jwoertink.
Proforma release for Crystal 1.0.
- UUID serializer helpers.
- Switches from Benchmark.measure to Time.measure, thanks @anapsix.
- Runner.idle_wait is now configured via Mosquito.configure instead of directly on Mosquito::Runner.
- Allows redis connection string to be specified via config option, thanks @watzon.
- Connecting to redis via implicit REDIS_URL parameter is deprecated, thanks @watzon.
- (Breaking) Dead tasks which have failed and expired are now cleaned up with a Redis TTL. See Pull #48.
- ability to configure Runner.idle_wait period, thanks @mamantoha.
- Point to Crystal 0.34.0, thanks @alex-lairan.
- Replaces
Logger
with the more flexibleLog
.
- Point to Crystal 0.31.1, 0.32.1.
- Redis version, thanks @nsuchy.
- Issue #26 Unresolved local var error, thanks @blacksmoke16.
- Throttling logic, thanks @blacksmoke16.
- Point to crystal 0.27, thanks @blacksmoke16.
- Brittle/intermittently failing tests.
- Logo, contributed by @psikoz.
- configuration for CI :
make test demo
will run all acceptance criteria. - demo section.
- makefile.
- specify crystal 0.26.
- simplify macro logic in QueuedJob.
- Specify crystal-redis 2.0 and crystal 0.25.
- Job classes can now disable rescheduling on failure.
- Readme.
- Misc typo fixes and flexibility upgrades.
- Update Crystal specification 0.23.1 -> .24.2.
- Correctly specify and sync version numbers from shard.yml / version.cr / git tag.
- Use configurable Logger instead of writing directly to stdout.
- Log output is now colorized and formatted to be read by human eyes.
- Breaking: Update Mosquito::Model type alias to match updates to Granite.
- BUG: task id was mutating on each save, causing weird logging when tasks reschedule.
- PERFORMANCE: adding IDLE_WAIT to prevent slamming redis when the queues are empty. Smarter querying of the queues for work.