Skip to content

Commit

Permalink
add in sqlite queue to docs (#973)
Browse files Browse the repository at this point in the history
Co-authored-by: Dotan J. Nahum <[email protected]>
  • Loading branch information
isaacdonaldson and jondot committed Nov 9, 2024
1 parent 0cf0f02 commit ec78f94
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docs-site/content/docs/processing/workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -164,7 +175,7 @@ The worker generator creates a worker file associated with your app and generate

In your `config/<environment>.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
Expand Down

0 comments on commit ec78f94

Please sign in to comment.