Skip to content

Commit

Permalink
chore(application-generic): moved the timed digest delay calculations…
Browse files Browse the repository at this point in the history
… to the main repo
  • Loading branch information
LetItRock committed May 15, 2023
1 parent 083fbfd commit a184f20
Show file tree
Hide file tree
Showing 7 changed files with 734 additions and 53 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion enterprise/packages
Submodule packages deleted from 30b472
6 changes: 3 additions & 3 deletions packages/application-generic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@
"pino-http": "^8.3.3",
"pino-pretty": "^9.4.0",
"redlock": "4.2.0",
"reflect-metadata": "^0.1.13"
"reflect-metadata": "^0.1.13",
"rrule": "^2.7.2"
},
"optionalDependencies": {
"@taskforcesh/bullmq-pro": "5.1.14",
"@novu/digest-schedule": "^0.14.0"
"@taskforcesh/bullmq-pro": "5.1.14"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {

import { ApiException } from '../../utils/exceptions';
import { isRegularDigest } from '../../utils/digest';
import { TimedDigestDelayService } from './timed-digest-delay.service';

const IS_ENTERPRISE = process.env.NOVU_MANAGED_SERVICE === 'true';

Expand Down Expand Up @@ -62,9 +63,6 @@ export class CalculateDelayService {
if (IS_ENTERPRISE && stepMetadata.type === DigestTypeEnum.TIMED) {
const timedDigestMeta = stepMetadata as IDigestTimedMetadata;

// eslint-disable-next-line @typescript-eslint/naming-convention
const { TimedDigestDelayService } = require('@novu/digest-schedule');

return TimedDigestDelayService.calculate({
unit: timedDigestMeta.unit,
amount: timedDigestMeta.amount,
Expand Down
Loading

0 comments on commit a184f20

Please sign in to comment.