fp/services/bot/src/tasks/README.md
CJ_Clippy fdd295e2b8
Some checks failed
ci / build (push) Failing after 0s
change scout to a service
2024-08-26 23:11:24 -08:00

22 lines
523 B
Markdown

Task names uses underscores because graphile_worker expects them to be that way because graphile_worker interfaces with Postgresql which uses lowercase and numberscores.
## Add job via SQL
```sql
SELECT graphile_worker.add_job('process_stream_recording', max_attempts := 3);
```
## complete/cancel a job via SQL
```sql
SELECT * FROM graphile_worker.complete_jobs(ARRAY[7, 99, 38674, ...]);
```
## cancel all jobs
```sql
SELECT * FROM graphile_worker.complete_jobs(
ARRAY(SELECT id FROM graphile_worker.jobs)
);
```