Skip to content

Commit

Permalink
feat(agenda): bump agenda to v5
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Jan 3, 2024
1 parent 3c10b05 commit 5a40cdb
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 19 deletions.
6 changes: 3 additions & 3 deletions packages/third-parties/agenda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
"@tsed/di": "7.54.0",
"@tsed/eslint": "7.44.1",
"@tsed/typescript": "7.44.1",
"agenda": "^4.1.3",
"agenda": "^5.0.0",
"eslint": "^8.12.0"
},
"peerDependencies": {
"agenda": "^4.1.3"
"agenda": ">=4"
}
}
}
4 changes: 2 additions & 2 deletions packages/third-parties/agenda/src/AgendaModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class AgendaModule implements OnDestroy, AfterListen {

async $onDestroy(): Promise<any> {
if (this.enabled) {
if (this.drainJobsBeforeClose) {
if (this.drainJobsBeforeClose && "drain" in this.agenda) {
this.logger.info({
event: "AGENDA_DRAIN",
message: "Agenda is draining all jobs before close"
Expand Down Expand Up @@ -120,7 +120,7 @@ export class AgendaModule implements OnDestroy, AfterListen {
Object.entries(store.define).forEach(([propertyKey, {name, ...options}]) => {
const instance = this.injector.get(provider.token);

const jobProcessor: Processor = instance[propertyKey].bind(instance) as Processor;
const jobProcessor: Processor<unknown> = instance[propertyKey].bind(instance) as Processor<unknown>;
const jobName = this.getNameForJob(propertyKey, store.namespace, name);

this.define(jobName, options, jobProcessor);
Expand Down
52 changes: 38 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7111,17 +7111,17 @@ adm-zip@^0.5.9:
resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.5.9.tgz#b33691028333821c0cf95c31374c5462f2905a83"
integrity sha512-s+3fXLkeeLjZ2kLjCBwQufpI5fuN+kIGBxu6530nVQZGVol0d7Y/M88/xw9HGGUcJjKf8LutN3VPRUBq6N7Ajg==

agenda@^4.1.3:
version "4.2.1"
resolved "https://registry.yarnpkg.com/agenda/-/agenda-4.2.1.tgz#3bf1e039d47502e0974657b611e6bbde268d98ad"
integrity sha512-6DRPa1j4GPQ+tJNJLr1wWC7qbuqqdc6+adcPXDlNQucpMfLKpWr+Vl6IPkaHJe2lIO1Zh7iyU6W61au+K4Rpyg==
agenda@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/agenda/-/agenda-5.0.0.tgz#1b22b8c7710e5d973498f354713665bfd5e51c33"
integrity sha512-jOoa7PvARpst/y2PI8h0wph4NmcjYJ/4wzFhQcHUbNgN+Hte/9h/MzKE0ZmHfIwdsSlnv3rhbBQ3Zd/gwFkThg==
dependencies:
cron-parser "^3.0.0"
cron-parser "^3.5.0"
date.js "~0.3.3"
debug "~4.3.0"
human-interval "~2.0.0"
moment-timezone "~0.5.27"
mongodb "^4.1.0"
debug "~4.3.4"
human-interval "~2.0.1"
moment-timezone "~0.5.37"
mongodb "^4.11.0"

agent-base@6, agent-base@^6.0.2:
version "6.0.2"
Expand Down Expand Up @@ -9837,7 +9837,7 @@ create-require@^1.1.0:
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==

cron-parser@^3.0.0:
cron-parser@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/cron-parser/-/cron-parser-3.5.0.tgz#b1a9da9514c0310aa7ef99c2f3f1d0f8c235257c"
integrity sha512-wyVZtbRs6qDfFd8ap457w3XVntdvqcwBGxBoTvJQH9KGVKL/fB+h2k3C8AqiVxvUQKN1Ps/Ns46CNViOpVDhfQ==
Expand Down Expand Up @@ -10074,7 +10074,7 @@ db-errors@^0.2.3:
resolved "https://registry.yarnpkg.com/db-errors/-/db-errors-0.2.3.tgz#a6a38952e00b20e790f2695a6446b3c65497ffa2"
integrity sha512-OOgqgDuCavHXjYSJoV2yGhv6SeG8nk42aoCSoyXLZUH7VwFG27rxbavU1z+VrZbZjphw5UkDQwUlD21MwZpUng==

debug@*, debug@4, debug@4.3.4, debug@4.x, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.0, debug@~4.3.1, debug@~4.3.2:
debug@*, debug@4, debug@4.3.4, debug@4.x, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2, debug@~4.3.4:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
Expand Down Expand Up @@ -13095,7 +13095,7 @@ https-proxy-agent@5.0.1, https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1:
agent-base "6"
debug "4"

human-interval@~2.0.0:
human-interval@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/human-interval/-/human-interval-2.0.1.tgz#655baf606c7067bb26042dcae14ec777b099af15"
integrity sha512-r4Aotzf+OtKIGQCB3odUowy4GfUDTy3aTWTfLd7ZF2gBCy3XW3v/dJLRefZnOFFnjqs5B1TypvS8WarpBkYUNQ==
Expand Down Expand Up @@ -16683,18 +16683,30 @@ module-not-found-error@^1.0.1:
resolved "https://registry.yarnpkg.com/module-not-found-error/-/module-not-found-error-1.0.1.tgz#cf8b4ff4f29640674d6cdd02b0e3bc523c2bbdc0"
integrity sha1-z4tP9PKWQGdNbN0CsOO8UjwrvcA=

moment-timezone@^0.5.34, moment-timezone@~0.5.27:
moment-timezone@^0.5.34:
version "0.5.37"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.37.tgz#adf97f719c4e458fdb12e2b4e87b8bec9f4eef1e"
integrity sha512-uEDzDNFhfaywRl+vwXxffjjq1q0Vzr+fcQpQ1bU0kbzorfS7zVtZnCnGc8mhWmF39d4g4YriF6kwA75mJKE/Zg==
dependencies:
moment ">= 2.9.0"

moment-timezone@~0.5.37:
version "0.5.43"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.43.tgz#3dd7f3d0c67f78c23cd1906b9b2137a09b3c4790"
integrity sha512-72j3aNyuIsDxdF1i7CEgV2FfxM1r6aaqJyLB2vwb33mXYyoyLly+F1zbWqhA3/bVIoJ4szlUoMbUnVdid32NUQ==
dependencies:
moment "^2.29.4"

moment@2.29.4, "moment@>= 2.9.0", moment@^2.29.1, moment@^2.9.0:
version "2.29.4"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108"
integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==

moment@^2.29.4:
version "2.30.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae"
integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==

mongodb-connection-string-url@^2.5.2:
version "2.5.2"
resolved "https://registry.yarnpkg.com/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.2.tgz#f075c8d529e8d3916386018b8a396aed4f16e5ed"
Expand Down Expand Up @@ -16740,7 +16752,7 @@ mongodb-memory-server@^8.15.1:
mongodb-memory-server-core "8.15.1"
tslib "^2.6.1"

mongodb@*, mongodb@^4.1.0, mongodb@^4.1.1, mongodb@^4.3.0:
mongodb@*, mongodb@^4.1.1, mongodb@^4.3.0:
version "4.16.0"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-4.16.0.tgz#8b0043de7b577c6a7e0ce44a2ca7315b9c0a7927"
integrity sha512-0EB113Fsucaq1wsY0dOhi1fmZOwFtLOtteQkiqOXGklvWMnSH3g2QS53f0KTP+/6qOkuoXE2JksubSZNmxeI+g==
Expand Down Expand Up @@ -16776,6 +16788,18 @@ mongodb@4.8.1:
optionalDependencies:
saslprep "^1.0.3"

mongodb@^4.11.0:
version "4.17.2"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-4.17.2.tgz#237c0534e36a3449bd74c6bf6d32f87a1ca7200c"
integrity sha512-mLV7SEiov2LHleRJPMPrK2PMyhXFZt2UQLC4VD4pnth3jMjYKHhtqfwwkkvS/NXuo/Fp3vbhaNcXrIDaLRb9Tg==
dependencies:
bson "^4.7.2"
mongodb-connection-string-url "^2.6.0"
socks "^2.7.1"
optionalDependencies:
"@aws-sdk/credential-providers" "^3.186.0"
"@mongodb-js/saslprep" "^1.1.0"

mongodb@^4.16.0:
version "4.17.1"
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-4.17.1.tgz#ccff6ddbda106d5e06c25b0e4df454fd36c5f819"
Expand Down

0 comments on commit 5a40cdb

Please sign in to comment.