mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
[agenda] Add name config option (#45422)
* [agenda] Add `name` config option * [agenda] add test for name config option * [agenda] AgendaConfiguration.name is optional
This commit is contained in:
parent
103651e726
commit
7ca8470413
@ -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' },
|
||||
});
|
||||
|
||||
6
types/agenda/index.d.ts
vendored
6
types/agenda/index.d.ts
vendored
@ -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.
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user