@chevre/domain 22.11.0-alpha.29 → 22.11.0-alpha.30

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.
@@ -130,6 +130,7 @@ export declare class TaskRepo {
130
130
  $lt: Date;
131
131
  };
132
132
  sort: {
133
+ numberOfTried?: factory.sortType;
133
134
  runsAt?: factory.sortType;
134
135
  };
135
136
  }, next?: INextFunction): Promise<Pick<factory.task.ITask<factory.taskName>, 'id' | 'name'> | null>;
@@ -486,7 +486,7 @@ class TaskRepo {
486
486
  remainingNumberOfTries: -1, // 残りトライ可能回数減らす
487
487
  numberOfTried: 1 // トライ回数増やす
488
488
  }
489
- }, Object.assign({ new: true, projection }, (typeof params.sort.runsAt === 'number')
489
+ }, Object.assign({ new: true, projection }, (typeof params.sort.numberOfTried === 'number' || typeof params.sort.runsAt === 'number')
490
490
  ? { sort: params.sort }
491
491
  : undefined))
492
492
  .setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
@@ -775,10 +775,10 @@ class TaskRepo {
775
775
  factory.taskStatus.Aborted
776
776
  ].map((taskStatus) => __awaiter(this, void 0, void 0, function* () {
777
777
  var _a, _b;
778
- const matchConditions = Object.assign({ status: { $eq: taskStatus }, runsAt: {
778
+ const matchConditions = Object.assign({ runsAt: {
779
779
  $gte: params.runsFrom,
780
780
  $lte: params.runsThrough
781
- } }, (typeof ((_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$ne) === 'string')
781
+ }, status: { $eq: taskStatus } }, (typeof ((_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$ne) === 'string')
782
782
  ? { 'project.id': { $ne: params.project.id.$ne } }
783
783
  : undefined);
784
784
  return this.agggregateByStatus({ matchConditions, status: taskStatus });
package/package.json CHANGED
@@ -115,5 +115,5 @@
115
115
  "postversion": "git push origin --tags",
116
116
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
117
117
  },
118
- "version": "22.11.0-alpha.29"
118
+ "version": "22.11.0-alpha.30"
119
119
  }