File tree Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Expand file tree Collapse file tree 2 files changed +35
-2
lines changed Original file line number Diff line number Diff line change 4
4
"private" : true ,
5
5
"scripts" : {
6
6
"dev:trigger" : " triggerdev dev" ,
7
- "management" : " ts-node -r tsconfig-paths/register ./src/management.ts"
7
+ "management" : " ts-node -r tsconfig-paths/register ./src/management.ts" ,
8
+ "queues" : " ts-node -r tsconfig-paths/register ./src/queues.ts"
8
9
},
9
10
"dependencies" : {
10
11
"@ffmpeg-installer/ffmpeg" : " ^1.1.0" ,
54
55
"tsconfig-paths" : " ^4.2.0" ,
55
56
"typescript" : " ^5.3.0"
56
57
}
57
- }
58
+ }
Original file line number Diff line number Diff line change
1
+ import dotenv from "dotenv" ;
2
+ import { simpleChildTask } from "./trigger/subtasks" ;
3
+
4
+ dotenv . config ( ) ;
5
+
6
+ export async function run ( ) {
7
+ await simpleChildTask . trigger ( { message : "Regular queue" } ) ;
8
+ await simpleChildTask . trigger (
9
+ { message : "Alt queue" } ,
10
+ {
11
+ queue : {
12
+ name : "queue-concurrency-3" ,
13
+ concurrencyLimit : 3 ,
14
+ } ,
15
+ }
16
+ ) ;
17
+
18
+ await simpleChildTask . batchTrigger ( [ { payload : { message : "Regular queue" } } ] ) ;
19
+ await simpleChildTask . batchTrigger ( [
20
+ {
21
+ payload : { message : "Regular queue" } ,
22
+ options : {
23
+ queue : {
24
+ name : "queue-concurrency-3" ,
25
+ concurrencyLimit : 3 ,
26
+ } ,
27
+ } ,
28
+ } ,
29
+ ] ) ;
30
+ }
31
+
32
+ run ( ) . catch ( console . error ) ;
You can’t perform that action at this time.
0 commit comments