aboutsummaryrefslogtreecommitdiff
path: root/sqitch/deploy
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-10-02 21:54:11 +0100
committerChristopher Baines <mail@cbaines.net>2019-10-02 21:54:11 +0100
commit427063c812e77885e5728aa5a8f4ee27f11bd2b0 (patch)
treecc91414d9cdb8803352f36490db299ca4e1264e6 /sqitch/deploy
parente00aabde4388c014778475966da2b7021dfef560 (diff)
downloaddata-service-427063c812e77885e5728aa5a8f4ee27f11bd2b0.tar
data-service-427063c812e77885e5728aa5a8f4ee27f11bd2b0.tar.gz
Make it easier to retry jobs
Add a new event 'retry', and run jobs where the number of retry events is greater or equal to the number of failure events. Also add an index to the git_branches table to make the finding jobs query a bit faster.
Diffstat (limited to 'sqitch/deploy')
-rw-r--r--sqitch/deploy/add_retry_value_to_job_event_enum.sql5
1 files changed, 5 insertions, 0 deletions
diff --git a/sqitch/deploy/add_retry_value_to_job_event_enum.sql b/sqitch/deploy/add_retry_value_to_job_event_enum.sql
new file mode 100644
index 0000000..11f9901
--- /dev/null
+++ b/sqitch/deploy/add_retry_value_to_job_event_enum.sql
@@ -0,0 +1,5 @@
+-- Deploy guix-data-service:add_retry_value_to_job_event_enum to pg
+
+ALTER TYPE job_event ADD VALUE 'retry';
+
+CREATE INDEX git_branches_name_and_datetime ON git_branches (name, datetime DESC);