1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-19 16:58:48 +02:00
phorge-phorge/resources/sql/patches/daemontaskarchive.sql
epriestley 5903ed650c Move completed tasks to an "archive" table and delete them in the GC
Summary:
Currently, when taskmasters complete a task it is immediately deleted. This prevents us from doing some general things, like:

  - Supporting the idea of permanent failure (e.g., after N failures just stop trying).
  - Showing the user how fast taskmasters are completing tasks.
  - Showing the user how long tasks took to complete.

Having better visibility into this is important to Drydock, which builds on the task system. Also, generally buff debug output for task execution.

Test Plan: Ran `bin/phd debug taskmaster`. Ran `bin/phd debug garbage`. Queued some tasks via various systems.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3852
2012-10-31 15:22:16 -07:00

13 lines
485 B
SQL

CREATE TABLE {$NAMESPACE}_worker.worker_archivetask (
id INT UNSIGNED PRIMARY KEY,
taskClass VARCHAR(255) NOT NULL COLLATE utf8_bin,
leaseOwner VARCHAR(255) COLLATE utf8_bin,
leaseExpires INT UNSIGNED,
failureCount INT UNSIGNED NOT NULL,
dataID INT UNSIGNED NOT NULL,
result INT UNSIGNED NOT NULL,
duration BIGINT UNSIGNED NOT NULL,
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL,
key(dateCreated)
) ENGINE=InnoDB, COLLATE utf8_general_ci;