Log calls to apply to graphite
Throttle apply/{id,batch} based on backlog
Change error message, log an error as well
Add a (too simple) test for /auth/:id/apply
Merge pull request #772 from Singly/bg-throttle-apply

Throttle calls to /auth/apply/{id,batch} based on the backlog
Fix error @jparkrr caught
Let us specify time to run when retasking

This is handy during testing to set it at `now` or `-1` to run immediately
instead of in a few minutes. It'll probably also be useful in the future to
spread out a big retask over time if we want to.
Record task delay stats

Whenever a task is run, we'll compare `Date.now` to `task.at` and see how long
ago (or in the future) the tasks was intended to run. I looked at logging
rollups per service and overall so we can see trends there, but it meant sending
a lot of duplicate, highly variable data, so I think it's better that we do that
mixing on the analysis side.

This changes the semantics of the `Scanning tasks` log line so that positive
numbers are higher delays (the task ran after its scheduled time). This makes
more sense to graph than how far ahead of schedule we're running something, and
we shouldn't expect running something ahead of schedule (now a negative number)
to be the common case.
Parallelize Instagram synclets

This lets Instagram synclets run totally independently of one another. I've
updated the config names to be simpler, since the variable names don't need
their own scoping anymore.

This will cause the media and feed synclets to run a full rescan since they're
effectively losing their configs, but that should be fine. Instagram is the last
service with a relatively large number of profiles, so it's probably not worth
running migrations.
add status tracking to push routes
Fix `/services/reset`

I don't think anyone is using this, but it was broken - the `syncNow` function
doesn't take the `synclet` second argument anymore.
Make pcron-retasker reconcile tasks

Sounds like this won't be necessary soon because the tasks will all be
calculated dynamically, but in the meantime, this lets us refresh a wiped-clean
task list. Before, the script would error out with no tasks to modify.
Add a script to clear all data from a profile

When we're testing auth or otherwise clean-slate synclet runs, the current flow
is to wipe out everything in Accounts, Profiles and Entries. Then, you have to
go log back in to kick everything off again, your access token changes, and
worst of all, you had to touch the mouse.

This script blows away all IJOD entries, tasks and config data associated with a
profile, without deleting the profile itself (and its auth data). Go
nuts...locally.
Don't log task delays for unscheduled tasks

Since we look at running the whole profile, a bunch of tasks will have a
negative delay just because they don't need to run yet. Those times don't mean
anything, so this only logs positive delays - that is, delays on the tasks that
are running on this pass.
Second try at configurable backlog thresholds
Merge pull request #776 from Singly/bg-backlog-thresholds-again

Second try at configurable backlog thresholds
Yahoo service

* Self synclet
* Authorization
* Refresh of access token lib
* Proxy
Formatted, Bugfixes, lint fixes.