pg-scheduler
Advanced tools
Comparing version 4.0.0-beta4 to 4.0.0-beta5
/// <reference types="sequelize" /> | ||
/// <reference types="node" /> | ||
/// <reference types="bluebird" /> | ||
import { Options, Sequelize as SequelizeType } from 'sequelize'; | ||
import { Options, Sequelize as SequelizeType, Transaction } from 'sequelize'; | ||
import * as Bluebird from 'bluebird'; | ||
@@ -40,2 +40,3 @@ import { ProcessorsStorage } from './ProcessorsStorage'; | ||
repeatOnError?: boolean; | ||
transaction?: Transaction; | ||
} | ||
@@ -42,0 +43,0 @@ export declare class Scheduler { |
@@ -67,3 +67,3 @@ "use strict"; | ||
let nextRunAt = RunAt_1.RunAt.calcNextRunAt(interval); | ||
const { startAt, endAt, concurrency, priority, timeout, now } = options; | ||
const { startAt, endAt, concurrency, priority, timeout, now, transaction } = options; | ||
if (now) { | ||
@@ -82,3 +82,3 @@ nextRunAt = new Date(); | ||
timeout, | ||
}); | ||
}, { transaction }); | ||
} | ||
@@ -88,3 +88,3 @@ everyDayAt(runAtTime, taskName, data = {}, options = {}) { | ||
let nextRunAt = RunAt_1.RunAt.calcNextRunAt(null, runAtTime); | ||
const { startAt, endAt, concurrency, priority, timeout, now } = options; | ||
const { startAt, endAt, concurrency, priority, timeout, now, transaction } = options; | ||
if (now) { | ||
@@ -103,3 +103,3 @@ nextRunAt = new Date(); | ||
timeout, | ||
}); | ||
}, { transaction }); | ||
} | ||
@@ -109,3 +109,3 @@ once(date, taskName, data = {}, options = {}) { | ||
let nextRunAt = new Date(date instanceof Date ? date.getTime() : date); | ||
const { startAt, endAt, concurrency, priority, timeout, now, repeatOnError } = options; | ||
const { startAt, endAt, concurrency, priority, timeout, now, repeatOnError, transaction } = options; | ||
if (now) { | ||
@@ -124,3 +124,3 @@ nextRunAt = new Date(); | ||
repeatOnError, | ||
}); | ||
}, { transaction }); | ||
} | ||
@@ -127,0 +127,0 @@ get totalProcessedCount() { |
{ | ||
"name": "pg-scheduler", | ||
"version": "4.0.0-beta4", | ||
"version": "4.0.0-beta5", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "test": "NODE_ENV=testing mocha test/**/*.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35823
903