Reliably perform the background processing for build events
Insert the build ids to a table and remove the ids once processed. If the data service is restarted and the in memory queue is lost, process all the items from the database queue.
This commit is contained in:
parent
04f427bcab
commit
961441cab0
9 changed files with 159 additions and 6 deletions
9
sqitch/deploy/build_background_processing_queue.sql
Normal file
9
sqitch/deploy/build_background_processing_queue.sql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
-- Deploy guix-data-service:build_background_processing_queue to pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE build_background_processing_queue (
|
||||
build_id integer PRIMARY KEY REFERENCES builds (id)
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
7
sqitch/revert/build_background_processing_queue.sql
Normal file
7
sqitch/revert/build_background_processing_queue.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-- Revert guix-data-service:build_background_processing_queue from pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
-- XXX Add DDLs here.
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -100,3 +100,4 @@ git_repositories_poll_interval 2023-10-08T20:36:09Z Chris <chris@felis> # Add gi
|
|||
git_repositories_job_priority 2024-03-07T09:39:27Z Chris <chris@felis> # Add git_repositories.job_priority
|
||||
build_server_build_id_index 2024-09-07T17:42:28Z Chris <chris@felis> # Add index on builds.build_server_build_id
|
||||
alter_build_servers_id_default 2024-12-15T20:48:51Z Chris <chris@fang> # Alter build_servers id default
|
||||
build_background_processing_queue 2025-05-14T14:18:14Z Chris <chris@fang> # Add build_background_processing_queue
|
||||
|
|
|
|||
7
sqitch/verify/build_background_processing_queue.sql
Normal file
7
sqitch/verify/build_background_processing_queue.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-- Verify guix-data-service:build_background_processing_queue on pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
-- XXX Add verifications here.
|
||||
|
||||
ROLLBACK;
|
||||
Loading…
Add table
Add a link
Reference in a new issue