@arkstack/queue 0.16.1 → 1.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/setup.js +8 -0
- package/package.json +4 -4
- package/stubs/config/queue.ts.stub +43 -0
package/dist/setup.js
CHANGED
|
@@ -17,5 +17,13 @@ Publisher.publishes({
|
|
|
17
17
|
to: "src/database/migrations/20260601000001_create_jobs_table.ts"
|
|
18
18
|
}]
|
|
19
19
|
});
|
|
20
|
+
Publisher.publishes({
|
|
21
|
+
package: "@arkstack/queue",
|
|
22
|
+
tag: "queue-config",
|
|
23
|
+
entries: [{
|
|
24
|
+
from: join(root, "stubs/config/queue.ts.stub"),
|
|
25
|
+
to: "src/config/queue.ts"
|
|
26
|
+
}]
|
|
27
|
+
});
|
|
20
28
|
//#endregion
|
|
21
29
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkstack/queue",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.16.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Queue module for Arkstack, providing a driver based queue transport and worker for background processing.",
|
|
6
6
|
"homepage": "https://arkstack.toneflix.net/guide/queue",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"./package.json": "./package.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@arkstack/common": "^
|
|
37
|
+
"@arkstack/common": "^1.16.3"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@h3ravel/musket": "^2.2.1",
|
|
41
41
|
"ioredis": "^5.4.1",
|
|
42
|
-
"@arkstack/contract": "^
|
|
43
|
-
"@arkstack/database": "^
|
|
42
|
+
"@arkstack/contract": "^1.16.3",
|
|
43
|
+
"@arkstack/database": "^1.16.3"
|
|
44
44
|
},
|
|
45
45
|
"peerDependenciesMeta": {
|
|
46
46
|
"@arkstack/database": {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { QueueConfig } from '@arkstack/queue'
|
|
2
|
+
|
|
3
|
+
export default (): QueueConfig => {
|
|
4
|
+
return {
|
|
5
|
+
/**
|
|
6
|
+
* Default Queue Connection
|
|
7
|
+
*
|
|
8
|
+
* The connection used when a job is dispatched without specifying one.
|
|
9
|
+
* The `sync` connection runs jobs immediately (no worker required) and is
|
|
10
|
+
* a sensible default for local development and tests.
|
|
11
|
+
*
|
|
12
|
+
* Supported drivers: sync, database, redis.
|
|
13
|
+
*/
|
|
14
|
+
default: env('QUEUE_CONNECTION', 'sync'),
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Queue Connections
|
|
18
|
+
*
|
|
19
|
+
* Configure a connection per backend. Run a worker with `ark queue:work`
|
|
20
|
+
* to process jobs on the database and redis connections.
|
|
21
|
+
*/
|
|
22
|
+
connections: {
|
|
23
|
+
sync: {
|
|
24
|
+
driver: 'sync',
|
|
25
|
+
},
|
|
26
|
+
database: {
|
|
27
|
+
driver: 'database',
|
|
28
|
+
table: env('QUEUE_TABLE', 'jobs'),
|
|
29
|
+
queue: env('QUEUE_NAME', 'default'),
|
|
30
|
+
retryAfter: env('QUEUE_RETRY_AFTER', 90),
|
|
31
|
+
},
|
|
32
|
+
redis: {
|
|
33
|
+
driver: 'redis',
|
|
34
|
+
host: env('REDIS_HOST', '127.0.0.1'),
|
|
35
|
+
port: env('REDIS_PORT', 6379),
|
|
36
|
+
password: env('REDIS_PASSWORD'),
|
|
37
|
+
db: env('REDIS_QUEUE_DB', 2),
|
|
38
|
+
queue: env('QUEUE_NAME', 'default'),
|
|
39
|
+
retryAfter: env('QUEUE_RETRY_AFTER', 90),
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
}
|