HomePhabricator

Track total time from task creation to task archival

Description

Track total time from task creation to task archival

Summary:
Ref T5401. Depends on D20201. Add timestamps to worker tasks to track task creation, and pass that through to archive tasks. This lets us measure the total time the task spent in the queue, not just the duration it was actually running.

Also displays this information in the daemon status console; see screenshot:

Screen Shot 2019-02-20 at 2.18.30 PM.png (266×1 px, 38 KB)

Test Plan:
Stopped daemons, ran bin/search index --all --background to create lots of tasks, restarted daemons, observed expected values for dateCreated and epochArchived in the archive worker table.

Also tested the changes to unarchiveTask by forcing a search task to permanently fail and then bin/worker retrying it.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley, PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T5401

Differential Revision: https://secure.phabricator.com/D20200