@chevre/domain 21.2.0-alpha.39 → 21.2.0-alpha.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/chevre/repo/task.d.ts +10 -0
- package/lib/chevre/repo/task.js +1 -1
- package/package.json +1 -1
|
@@ -48,9 +48,19 @@ export declare class MongoRepository {
|
|
|
48
48
|
*/
|
|
49
49
|
executeTasks(params: {
|
|
50
50
|
now: Date;
|
|
51
|
+
/**
|
|
52
|
+
* 指定期間遅延しているタスクを実行する
|
|
53
|
+
*/
|
|
51
54
|
delayInSeconds: number;
|
|
52
55
|
limit: number;
|
|
53
56
|
name: {
|
|
57
|
+
/**
|
|
58
|
+
* 指定タスクのみ実行する
|
|
59
|
+
*/
|
|
60
|
+
$in?: factory.taskName[];
|
|
61
|
+
/**
|
|
62
|
+
* 指定タスク以外のみ実行する
|
|
63
|
+
*/
|
|
54
64
|
$nin?: factory.taskName[];
|
|
55
65
|
};
|
|
56
66
|
}): Promise<Pick<import("@chevre/factory/lib/task").ITask | import("@chevre/factory/lib/task/deleteAssetTransaction").ITask | import("@chevre/factory/lib/task/deleteOrder").ITask | import("@chevre/factory/lib/task/deleteTransaction").ITask | import("@chevre/factory/lib/task/sendEmailMessage").ITask | import("@chevre/factory/lib/task/triggerWebhook").ITask | import("@chevre/factory/lib/task/confirmMoneyTransfer").ITask | import("@chevre/factory/lib/task/confirmRegisterService").ITask | import("@chevre/factory/lib/task/confirmPayTransaction").ITask | import("@chevre/factory/lib/task/confirmRegisterServiceTransaction").ITask | import("@chevre/factory/lib/task/confirmReserveTransaction").ITask | import("@chevre/factory/lib/task/deleteMember").ITask | import("@chevre/factory/lib/task/givePointAward").ITask | import("@chevre/factory/lib/task/orderProgramMembership").ITask | import("@chevre/factory/lib/task/placeOrder").ITask | import("@chevre/factory/lib/task/returnOrder").ITask | import("@chevre/factory/lib/task/returnMoneyTransfer").ITask | import("@chevre/factory/lib/task/returnPayTransaction").ITask | import("@chevre/factory/lib/task/returnPointAward").ITask | import("@chevre/factory/lib/task/returnReserveTransaction").ITask | import("@chevre/factory/lib/task/sendOrder").ITask | import("@chevre/factory/lib/task/voidMoneyTransferTransaction").ITask | import("@chevre/factory/lib/task/voidPayTransaction").ITask | import("@chevre/factory/lib/task/voidRegisterServiceTransaction").ITask | import("@chevre/factory/lib/task/voidReserveTransaction").ITask, "id" | "name" | "status">[]>;
|
package/lib/chevre/repo/task.js
CHANGED
|
@@ -254,7 +254,7 @@ class MongoRepository {
|
|
|
254
254
|
const runsAtLt = moment(params.now)
|
|
255
255
|
.add(-params.delayInSeconds, 'seconds')
|
|
256
256
|
.toDate();
|
|
257
|
-
const delayedTasks = yield this.taskModel.find(Object.assign({ status: { $eq: factory.taskStatus.Ready }, runsAt: { $lt: runsAtLt } }, (Array.isArray(params.name.$nin)) ? { name: { $nin: params.name.$nin } } : undefined))
|
|
257
|
+
const delayedTasks = yield this.taskModel.find(Object.assign(Object.assign({ status: { $eq: factory.taskStatus.Ready }, runsAt: { $lt: runsAtLt } }, (Array.isArray(params.name.$in)) ? { name: { $in: params.name.$in } } : undefined), (Array.isArray(params.name.$nin)) ? { name: { $nin: params.name.$nin } } : undefined))
|
|
258
258
|
.select({
|
|
259
259
|
_id: 1,
|
|
260
260
|
name: 1,
|
package/package.json
CHANGED