@chevre/domain 21.2.0-alpha.160 → 21.2.0-alpha.161

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.
@@ -244,11 +244,15 @@ class MongoRepository {
244
244
  // void化(2023-06-23~)
245
245
  saveMovieTheaterByBranchCode4coa(params) {
246
246
  return __awaiter(this, void 0, void 0, function* () {
247
+ const { containsPlace } = params, movieTheater4update = __rest(params, ["containsPlace"]);
247
248
  const movieTheaterDoc = yield this.placeModel.findOneAndUpdate({
248
249
  typeOf: { $eq: factory.placeType.MovieTheater },
249
250
  'project.id': { $eq: params.project.id },
250
251
  branchCode: { $eq: params.branchCode }
251
- }, params, {
252
+ },
253
+ // containsPlaceの保管を廃止(2023-07-04~)
254
+ // params,
255
+ movieTheater4update, {
252
256
  new: true,
253
257
  projection: { _id: 1 }
254
258
  })
@@ -101,6 +101,14 @@ export declare class MongoRepository {
101
101
  $lte: Date;
102
102
  };
103
103
  }): Promise<import("mongodb").DeleteResult>;
104
+ /**
105
+ * 不要なタスクを削除する
106
+ */
107
+ deleteRunsAtPassedCertainPeriod(params: {
108
+ runsAt: {
109
+ $lt: Date;
110
+ };
111
+ }): Promise<void>;
104
112
  countDelayedTasks(params: {
105
113
  delayInSeconds: number;
106
114
  name: {
@@ -422,6 +422,18 @@ class MongoRepository {
422
422
  .exec();
423
423
  });
424
424
  }
425
+ /**
426
+ * 不要なタスクを削除する
427
+ */
428
+ deleteRunsAtPassedCertainPeriod(params) {
429
+ return __awaiter(this, void 0, void 0, function* () {
430
+ yield this.taskModel.deleteMany({
431
+ runsAt: { $lt: params.runsAt.$lt },
432
+ status: { $in: [factory.taskStatus.Aborted, factory.taskStatus.Executed] }
433
+ })
434
+ .exec();
435
+ });
436
+ }
425
437
  countDelayedTasks(params) {
426
438
  return __awaiter(this, void 0, void 0, function* () {
427
439
  const runsAtLt = moment()
package/package.json CHANGED
@@ -117,5 +117,5 @@
117
117
  "postversion": "git push origin --tags",
118
118
  "prepublishOnly": "npm run clean && npm run build && npm test && npm run doc"
119
119
  },
120
- "version": "21.2.0-alpha.160"
120
+ "version": "21.2.0-alpha.161"
121
121
  }