sql queries (#22)
This commit is contained in:
parent
a707ce2f5c
commit
5b61458b5f
11 changed files with 11 additions and 1 deletions
1
src/asynk/queries/fail_task.sql
Normal file
1
src/asynk/queries/fail_task.sql
Normal file
|
@ -0,0 +1 @@
|
|||
UPDATE "fang_tasks" SET "state" = $1 , "error_message" = $2 , "updated_at" = $3 WHERE id = $4
|
1
src/asynk/queries/insert_job.sql
Normal file
1
src/asynk/queries/insert_job.sql
Normal file
|
@ -0,0 +1 @@
|
|||
INSERT INTO "fang_tasks" ("metadata", "created_at") VALUES ($1, $2)
|
1
src/asynk/queries/insert_periodic_job.sql
Normal file
1
src/asynk/queries/insert_periodic_job.sql
Normal file
|
@ -0,0 +1 @@
|
|||
INSERT INTO "fang_periodic_tasks" ("metadata", "scheduled_at" , "period_in_seconds") VALUES ($1, $2 , $3)
|
1
src/asynk/queries/insert_periodic_task.sql
Normal file
1
src/asynk/queries/insert_periodic_task.sql
Normal file
|
@ -0,0 +1 @@
|
|||
INSERT INTO "fang_periodic_tasks" ("metadata", "period_in_seconds") VALUES ($1, $2)
|
|
@ -1 +1 @@
|
|||
INSERT INTO "fang_tasks" ("metadata", "error_message", "state", task_type") VALUES ($1, $2, $3, $4);
|
||||
INSERT INTO "fang_tasks" ("metadata", "error_message", "state", "task_type") VALUES ($1, $2, $3, $4)
|
||||
|
|
1
src/asynk/queries/remove_all_periodic_tasks.sql
Normal file
1
src/asynk/queries/remove_all_periodic_tasks.sql
Normal file
|
@ -0,0 +1 @@
|
|||
DELETE FROM "fang_periodic_tasks"
|
1
src/asynk/queries/remove_all_tasks.sql
Normal file
1
src/asynk/queries/remove_all_tasks.sql
Normal file
|
@ -0,0 +1 @@
|
|||
DELETE FROM "fang_tasks"
|
1
src/asynk/queries/remove_task.sql
Normal file
1
src/asynk/queries/remove_task.sql
Normal file
|
@ -0,0 +1 @@
|
|||
DELETE FROM "fang_tasks" WHERE id = $1
|
1
src/asynk/queries/remove_tasks_type.sql
Normal file
1
src/asynk/queries/remove_tasks_type.sql
Normal file
|
@ -0,0 +1 @@
|
|||
DELETE FROM "fang_tasks" WHERE task_type = $1
|
1
src/asynk/queries/schedule_next_task.sql
Normal file
1
src/asynk/queries/schedule_next_task.sql
Normal file
|
@ -0,0 +1 @@
|
|||
UPDATE "fang_periodic_tasks" SET "scheduled_at" = $1 , "updated_at" = $2
|
1
src/asynk/queries/update_task_state.sql
Normal file
1
src/asynk/queries/update_task_state.sql
Normal file
|
@ -0,0 +1 @@
|
|||
UPDATE "fang_tasks" SET "state" = $1 , "updated_at" = $2 WHERE id = $3
|
Loading…
Reference in a new issue