MCPcopy
hub / github.com/midwayjs/midway / HelloTask

Class HelloTask

packages/bullmq/test/index.test.ts:17–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15describe(`/test/index.test.ts`, () => {
16 it('test auto repeat processor', async () => {
17 @Processor('HelloTask', {
18 repeat: {
19 pattern: FORMAT.CRONTAB.EVERY_PER_5_SECOND
20 }
21 })
22 class HelloTask implements IProcessor {
23 @MainApp()
24 app: Application;
25
26 async execute() {
27 this.app.setAttr(`task`, 'task');
28 }
29 }
30
31 @Processor('concurrency', {}, { limiter: { max: 3, duration: 1000 }, concurrency: 3 })
32 class QueueTask {

Callers

nothing calls this directly

Calls 2

ProcessorFunction · 0.90
MainAppFunction · 0.90

Tested by

no test coverage detected