mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 01:58:21 +02:00
♻️ Refactor async tasks implementation.
And migrate the previous unrelated subsystems such that gc and email sending to the new subsystem.
This commit is contained in:
parent
70b4a2b4d4
commit
c6f7ded125
12 changed files with 371 additions and 209 deletions
17
backend/resources/migrations/0007.tasks.sql
Normal file
17
backend/resources/migrations/0007.tasks.sql
Normal file
|
@ -0,0 +1,17 @@
|
|||
CREATE TABLE IF NOT EXISTS tasks (
|
||||
id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
|
||||
created_at timestamptz NOT NULL DEFAULT clock_timestamp(),
|
||||
modified_at timestamptz NOT NULL DEFAULT clock_timestamp(),
|
||||
completed_at timestamptz NULL DEFAULT NULL,
|
||||
scheduled_at timestamptz NOT NULL,
|
||||
|
||||
name text NOT NULL,
|
||||
props bytea NOT NULL,
|
||||
|
||||
retry_num smallint NOT NULL DEFAULT 0,
|
||||
status text NOT NULL DEFAULT 'new'
|
||||
);
|
||||
|
||||
CREATE INDEX tasks__scheduled_at__idx
|
||||
ON tasks (scheduled_at);
|
Loading…
Add table
Add a link
Reference in a new issue