lucidsoftware / piezo

Piezo is a set of tools for operating a quartz scheduling cluster.
Apache License 2.0
53 stars 28 forks source link

Add a missing index and a maximum amount of time between trigger successes #64

Closed jjudd closed 7 years ago

jjudd commented 7 years ago

Two changes:

Add an index to the job_history table to be able to query it by trigger

Currently the job_history table has indices to query by job name and group. The table also stores trigger information, but has no index to query it. This adds an index to be able to query by trigger name and group, so the ability to query job history by trigger added in 1.15 is not incredibly slow.

Add a maximum amount of time between successes for each trigger.

This is a continuation of the monitoring work done by adding monitoring priority. This adds an SLA for each trigger - the maximum number of time that can pass between successes. We have a Job at Lucidchart which enforces this internally. Including it in the Piezo project requires us to open source an additional project. Until then, you can write a job that consumes this information and alerts when a trigger is in an error state.