hlascelles / que-scheduler

A lightweight cron scheduler for the async job worker Que
MIT License
115 stars 22 forks source link

Add a diagnostics command #161

Open hlascelles opened 4 years ago

hlascelles commented 4 years ago

This could be run in the Rails console to check:

  1. The scheduler job is present
  2. It's "next run time" is soon or recent.
  3. The migrations are up to date
hlascelles commented 4 years ago

Much of this already exists: https://github.com/hlascelles/que-scheduler/blob/master/lib/que/scheduler/state_checks.rb#L64

It might be nice to expose it as a healthcheck endpoint (that won't error during a deploy).