JOBS_BACKEND_UNREACHABLE
Jobs backend unreachable
What happened
The configured jobs backend (memory/sqlite/redis) wasn't reachable when enqueuing or claiming a job.
How to fix
Verify the backend is healthy. For Redis, ping with redis-cli. For sqlite, check disk space + file permissions.
Example
import { JobRunner } from "@foundryprotocol/0gkit-jobs";
import { SqliteBackend } from "@foundryprotocol/0gkit-jobs/backends/sqlite";
const runner = new JobRunner({ backend: new SqliteBackend({ path: ".jobs.db" }) });
await runner.start();
// If the sqlite file lives on an unwritable disk this throws JOBS_BACKEND_UNREACHABLE.
Reference
- Namespace:
JOBS - Help URL:
https://0gkit.com/errors/JOBS_BACKEND_UNREACHABLE - See also: all error codes