voxmedia / autotune

Platform for reusable news tools
BSD 3-Clause "New" or "Revised" License
414 stars 33 forks source link

Refactor of jobs #433

Closed ryanmark closed 6 years ago

ryanmark commented 6 years ago

We often use cron to trigger rebuilds of jobs to enable auto-updating of projects. Sometimes the jobs involved in building get run out-of-order if new builds are triggered too rapidly.

This PR merges the three jobs needed for a project build into a single job.

Since blueprint or project files can't be used simultaneously by multiple jobs, we needed a locking mechanism which was done at the job level. Since we're combining jobs, the new merged job manages locks internally, instead of using the locking active job concern.

TL;DR building projects should go faster and have fewer problems.