@chevre/domain 26.0.0-alpha.18 → 26.0.0-alpha.19
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.
|
@@ -29,7 +29,7 @@ export declare class TaskDelayedRepo {
|
|
|
29
29
|
/**
|
|
30
30
|
* 実行日時を一定期間過ぎたReadyタスクについて、Runningステータスに変更した上で、Runningイベントを発生させる
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
runDelayedTaskIfExistsByName(params: {
|
|
33
33
|
/**
|
|
34
34
|
* 必ずタスク名指定で実行する
|
|
35
35
|
*/
|
|
@@ -53,10 +53,9 @@ export declare class TaskDelayedRepo {
|
|
|
53
53
|
}): Promise<Pick<factory.task.ITask<factory.taskName>, 'id' | 'name'> | null>;
|
|
54
54
|
/**
|
|
55
55
|
* 実行日時を一定期間過ぎたReadyタスクについて、Runningステータスに変更した上で、Runningイベントを発生させる
|
|
56
|
-
*
|
|
57
|
-
* 2026-08-04~
|
|
56
|
+
* 2026-08-06~
|
|
58
57
|
*/
|
|
59
|
-
|
|
58
|
+
runDelayedTaskIfExists(params: {
|
|
60
59
|
runsAt: {
|
|
61
60
|
$lt: Date;
|
|
62
61
|
};
|
|
@@ -81,11 +81,11 @@ class TaskDelayedRepo {
|
|
|
81
81
|
/**
|
|
82
82
|
* 実行日時を一定期間過ぎたReadyタスクについて、Runningステータスに変更した上で、Runningイベントを発生させる
|
|
83
83
|
*/
|
|
84
|
-
async
|
|
84
|
+
async runDelayedTaskIfExistsByName(params) {
|
|
85
85
|
if (!(params.runsAt.$lt instanceof Date)) {
|
|
86
86
|
throw new factory_1.factory.errors.Argument('runsAt.$lt', 'must be Date');
|
|
87
87
|
}
|
|
88
|
-
//
|
|
88
|
+
// インデックスについては、name指定であれば'executeOneByName'あるいは'runDelayedTaskByName'を想定
|
|
89
89
|
const filter = {
|
|
90
90
|
status: { $eq: factory_1.factory.taskStatus.Ready },
|
|
91
91
|
name: params.name,
|
|
@@ -119,14 +119,13 @@ class TaskDelayedRepo {
|
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
121
|
* 実行日時を一定期間過ぎたReadyタスクについて、Runningステータスに変更した上で、Runningイベントを発生させる
|
|
122
|
-
*
|
|
123
|
-
* 2026-08-04~
|
|
122
|
+
* 2026-08-06~
|
|
124
123
|
*/
|
|
125
|
-
async
|
|
124
|
+
async runDelayedTaskIfExists(params) {
|
|
126
125
|
if (!(params.runsAt.$lt instanceof Date)) {
|
|
127
126
|
throw new factory_1.factory.errors.Argument('runsAt.$lt', 'must be Date');
|
|
128
127
|
}
|
|
129
|
-
//
|
|
128
|
+
// インデックスについては、name未指定であれば'executeOneByNameIfExists'を想定
|
|
130
129
|
const filter = {
|
|
131
130
|
status: { $eq: factory_1.factory.taskStatus.Ready },
|
|
132
131
|
runsAt: { $lt: params.runsAt.$lt }
|
package/package.json
CHANGED