From d312f277bae1390fd51e35ce3176498327f76c0e Mon Sep 17 00:00:00 2001 From: Isaac Date: Fri, 8 Nov 2024 09:45:46 -0800 Subject: [PATCH] add in sqlite queue to docs --- docs-site/content/docs/processing/workers.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs-site/content/docs/processing/workers.md b/docs-site/content/docs/processing/workers.md index 6f68320c0..3ced08f27 100644 --- a/docs-site/content/docs/processing/workers.md +++ b/docs-site/content/docs/processing/workers.md @@ -19,6 +19,7 @@ Loco provides the following options for background jobs: * Redis backed (powered by `sidekiq-rs`) * Postgres backed (own implementation) +* SQLite backed (own implementation) * Tokio-async based (same-process, evented thread based background jobs) @@ -57,11 +58,21 @@ Or a Postgres based queue backend: ```yaml queue: kind: Postgres - # Redis connection URI + # Postgres Queue connection URI uri: "{{ get_env(name="PGQ_URL", default="postgres://localhost:5432/mydb") }}" dangerously_flush: false ``` +Or a SQLite based queue backend: + +```yaml +queue: + kind: Sqlite + # SQLite Queue connection URI + uri: "{{ get_env(name="SQLTQ_URL", default="sqlite://loco_development.sqlite?mode=rwc") }}" + dangerously_flush: false +``` + ## Running the worker process You can run in two ways, depending on which setting you chose for background workers: @@ -164,7 +175,7 @@ The worker generator creates a worker file associated with your app and generate In your `config/.yaml` you can specify the worker mode. BackgroundAsync and BackgroundQueue will process jobs in a non-blocking manner, while ForegroundBlocking will process jobs in a blocking manner. -The main difference between BackgroundAsync and BackgroundQueue is that the latter will use Redis to store the jobs, while the former does not require Redis and will use async within the same process. +The main difference between BackgroundAsync and BackgroundQueue is that the latter will use Redis/Postgres/SQLite to store the jobs, while the former does not require Redis/Postgres/SQLite and will use async in memory within the same process. ```yaml # Worker Configuration