diff --git a/types/agenda/agenda-tests.ts b/types/agenda/agenda-tests.ts index aef7ecd7d6..7553d2bd11 100644 --- a/types/agenda/agenda-tests.ts +++ b/types/agenda/agenda-tests.ts @@ -6,6 +6,7 @@ var mongoConnectionString = "mongodb://127.0.0.1/agenda"; (async () => { var agenda = new Agenda({ db: { address: mongoConnectionString } }); var agenda = new Agenda({ + name: 'backend', mongo: (await MongoClient.connect(mongoConnectionString)).db(), db: { collection: 'agenda-jobs' }, }); diff --git a/types/agenda/index.d.ts b/types/agenda/index.d.ts index d838b6f0b5..0ac3d4e28c 100644 --- a/types/agenda/index.d.ts +++ b/types/agenda/index.d.ts @@ -165,6 +165,12 @@ declare namespace Agenda { */ interface AgendaConfiguration { + /** + * Sets the `lastModifiedBy` field to `name` in the jobs collection. Useful if you have multiple job processors + * (agendas) and want to see which job queue last ran the job. + */ + name?: string; + /** * Sets the interval with which the queue is checked. A number in milliseconds or a frequency string. */