Slay Q Server
![Codecov](https://img.shields.io/codecov/c/gh/unjs/packageName/main?style=flat&colorA=18181B&colorB=F0DB4F)
This is the server component of Slay Q.
This is a thin wrapper around Graphile Worker which is doing all of the heavy lifting.
Usage
Install package:
npm install @slay-pics/slay-q-server
yarn add @slay-pics/slay-q-server
pnpm install @slay-pics/slay-q-server
bun install @slay-pics/slay-q-server
Run:
npx slay-q-server /path/to/slay-config.json
Requirements
Migrations
You must run the SQL migrations in the migrations folder against your database. Slay Q provides some additional functionality on
top of Graphile Worker that requires additional database tables and stored procedures to be installed.
Configuration
To run slay-q-server, you need to create a config file first:
{
"queues": {
"mail": {
"concurrency": 4
},
"messaging": {
"concurrency": 6,
"alias": [
"dispatch",
"ready"
]
},
"interactions": {
"concurrency": 1,
"alias": [
"reconcile",
"discord"
]
},
"housekeeping": {
"concurrency": 2
},
"profile": {
"concurrency": 8
},
"general": {
"concurrency": 10
}
}
}
We are essentially defining a variety of queues and their level of concurrency (the number of tasks that can run at once in the queue).
Additionally, we are specifying aliases for these queues. These aliases are only provided to help keep things organized on the client
side of things.
License
Published under MIT License.