flightless/action-scheduler — pull request #18 by thenbrent (2014-04-24 01:24:49+00:00)
Title: Restrict concurrent batches & improve reset/timeout logic

SHA: dad5ca4 restricts the scheduler to 5 concurrent batches (a solution to issues outlined in #17).

SHA: 5e07516972 sets the modified date to the date/time an action is triggered, to improve record keeping and so that `mark_failures()` correctly identifies actions that have been in progress for more than 30 minutes (rather than potentially just in the queue for 30 minutes but missed by `reset_timeouts()` because of a `'action_scheduler_cleanup_batch_size'` value too low).

SHA: b55517af sets the cleanup batch size to same size as the runner batch size to capture all actions added to a queue when resetting timeouts. This is important to avoid having actions sit in the queue for significant amounts of time and also, before SHA: 5e07516972, be marked as timing out before even having a chance to start running (because they were added to the queue 30 minutes prior, not because they'd been running for 30 minutes).