@@ -39,7 +39,7 @@ export abstract class Queue<TJobMap = Record<string, any>, TJobRequest extends B
3939 protected ttrDefault = 300 ;
4040 protected plugins : QueuePlugin [ ] ;
4141 protected pluginDisposers : Array < ( ) => Promise < void > > = [ ] ;
42- public readonly name ? : string ;
42+ public readonly name : string ;
4343
4444 /**
4545 * Registry of job handlers mapping job names to their handler functions.
@@ -62,14 +62,14 @@ export abstract class Queue<TJobMap = Record<string, any>, TJobRequest extends B
6262 * Creates a new Queue instance.
6363 *
6464 * @param options - Configuration options
65+ * @param options.name - Required name for the queue
6566 * @param options.ttrDefault - Default time-to-run for jobs in seconds (default: 300)
66- * @param options.name - Optional name for the queue
6767 * @param options.plugins - Array of plugins to use with this queue
6868 */
69- constructor ( options : QueueOptions = { } ) {
69+ constructor ( options : QueueOptions ) {
7070 super ( ) ;
71- if ( options . ttrDefault ) this . ttrDefault = options . ttrDefault ;
7271 this . name = options . name ;
72+ if ( options . ttrDefault ) this . ttrDefault = options . ttrDefault ;
7373 this . plugins = options . plugins || [ ] ;
7474 }
7575
@@ -235,7 +235,7 @@ export abstract class Queue<TJobMap = Record<string, any>, TJobRequest extends B
235235 if ( this . pluginDisposers . length === 0 ) {
236236 for ( const plugin of this . plugins ) {
237237 if ( plugin . init ) {
238- const dispose = await plugin . init ( { queue : this as any , queueName : this . name } ) ;
238+ const dispose = await plugin . init ( { queue : this as any } ) ;
239239 if ( dispose ) {
240240 this . pluginDisposers . push ( dispose ) ;
241241 disposers . push ( dispose ) ;
0 commit comments