taskcluster/taskcluster-queue — pull request #21 by jonasfj (2014-08-03 04:20:54+00:00)
Title: Task defined exchange

This based on #20...

Adds an exchange called `task-defined` for which a message is emitted whenever `createTask` or `defineTask` is called.

Basically, `createTask` will always emit `task-pending`, but I imagine for something like treeherder integration we might want to have notifications of task that are just defined and waiting for to be scheduled. I'm not exactly sure what else it could be used for... Perhaps predictive scaling in the aws-provisioner, as a large number of defined tasks are likely to become pending soon...

Anyways, it seemed like a missing exchange to me. I've been thinking about added `run-failed` to be emitted regardless of whether or not the queue decides to retry the task... But I'm leaving it alone for now.
Also considered renaming everything from `task-` to `run-` (e.g. `run-pending`). But as tasks only have one active run, it's acceptable to call the exchanges `task-...`.