Skip to content

Commit d0bdfbd

Browse files
committed
Post-migration deployment
1 parent a3bb67f commit d0bdfbd

File tree

7 files changed

+17
-371
lines changed

7 files changed

+17
-371
lines changed

share-api.cabal

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ library
3030
Share.BackgroundJobs
3131
Share.BackgroundJobs.Diffs.ContributionDiffs
3232
Share.BackgroundJobs.Diffs.Queries
33-
Share.BackgroundJobs.EntityDepthMigration.Queries
34-
Share.BackgroundJobs.EntityDepthMigration.Worker
3533
Share.BackgroundJobs.Errors
3634
Share.BackgroundJobs.Monad
3735
Share.BackgroundJobs.Search.DefinitionSync

sql/migration-helpers/2025-02-25_causal_depth_migration.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,28 @@ INSERT INTO unfinished_causal_depths (id)
2424
FROM causals c
2525
WHERE NOT EXISTS (
2626
SELECT FROM causal_depth cd WHERE cd.causal_id = c.id
27-
);
27+
) ON CONFLICT DO NOTHING;
2828

2929
INSERT INTO unfinished_namespace_depths (id)
3030
SELECT n.namespace_hash_id
3131
FROM namespaces n
3232
WHERE NOT EXISTS (
3333
SELECT FROM namespace_depth nd WHERE nd.namespace_hash_id = n.namespace_hash_id
34-
);
34+
) ON CONFLICT DO NOTHING;
3535

3636
INSERT INTO unfinished_patch_depths (id)
3737
SELECT p.id
3838
FROM patches p
3939
WHERE NOT EXISTS (
4040
SELECT FROM patch_depth pd WHERE pd.patch_id = p.id
41-
);
41+
) ON CONFLICT DO NOTHING;
4242

4343
INSERT INTO unfinished_component_depths (id)
4444
SELECT ch.id
4545
FROM component_hashes ch
4646
WHERE NOT EXISTS (
4747
SELECT FROM component_depth cd WHERE cd.component_hash_id = ch.id
48-
);
48+
) ON CONFLICT DO NOTHING;
4949

5050
-- Afterwards
5151
DROP TABLE unfinished_causal_depths;

src/Share/BackgroundJobs.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
module Share.BackgroundJobs (startWorkers) where
22

33
import Ki.Unlifted qualified as Ki
4-
import Share.BackgroundJobs.EntityDepthMigration.Worker qualified as EntityDepthMigration
54
import Share.BackgroundJobs.Monad (Background)
65
import Share.BackgroundJobs.Search.DefinitionSync qualified as DefnSearch
76

87
-- | Kicks off all background workers.
98
startWorkers :: Ki.Scope -> Background ()
109
startWorkers scope = do
1110
DefnSearch.worker scope
12-
-- Temporary disable background diff jobs until the new diffing logic is done.
13-
-- ContributionDiffs.worker scope
14-
-- SerializedEntitiesMigration.worker scope
15-
EntityDepthMigration.worker scope
11+
12+
-- Temporary disable background diff jobs until the new diffing logic is done.
13+
-- ContributionDiffs.worker scope
14+
-- SerializedEntitiesMigration.worker scope

src/Share/BackgroundJobs/EntityDepthMigration/Queries.hs

Lines changed: 0 additions & 256 deletions
This file was deleted.

0 commit comments

Comments
 (0)