githubnext/chopinPublic

Let's compose rich plans together

Add background job runner and owner fencing

KCKrzysztof Cieslak authored committed by Krzysztof Cieślak
35c4119Patch
Parenta545acb
18 files changed+1697-31
StackedSplit
apps/server/src/agent/active-owner.test.ts+182 −0
apps/server/src/agent/active-owner.ts+215 −0
apps/server/src/jobs/registry.ts+23 −1
apps/server/src/jobs/runner.test.ts+382 −0
apps/server/src/jobs/runner.ts+659 −0
apps/server/src/jobs/service.test.ts+1 −0
apps/server/src/jobs/service.ts+45 −14
apps/server/src/main.ts+98 −12
apps/server/src/storage/contract.ts+12 −1
apps/server/src/storage/memory/adapter.ts+15 −0
apps/server/src/storage/memory/jobs.ts+12 −2
apps/server/src/storage/model.ts+7 −0
apps/server/src/storage/port.ts+2 −0
apps/server/src/storage/postgres/adapter.test.ts+1 −0
apps/server/src/storage/postgres/adapter.ts+30 −0
apps/server/src/storage/postgres/jobs.ts+8 −1
apps/server/src/storage/postgres/migrations.ts+3 −0
apps/server/src/storage/postgres/migrations/005_background_job_failures.sql+2 −0