rez_core 6.5.19 → 6.5.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "6.5.19",
3
+ "version": "6.5.21",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -4,6 +4,8 @@ import {
4
4
  Injectable,
5
5
  Logger,
6
6
  NotFoundException,
7
+ Optional,
8
+ forwardRef,
7
9
  } from '@nestjs/common';
8
10
  import { InjectRepository } from '@nestjs/typeorm';
9
11
  import { DataSource, Repository } from 'typeorm';
@@ -32,6 +34,8 @@ export class WorkflowAutomationService extends EntityServiceImpl {
32
34
  private readonly dataSource: DataSource,
33
35
  @InjectRepository(ScheduledWorkflow)
34
36
  private readonly scheduledWorkflowRepository: Repository<ScheduledWorkflow>,
37
+ @Optional()
38
+ @Inject(forwardRef(() => WorkflowScheduleService))
35
39
  private readonly workflowScheduleService: WorkflowScheduleService,
36
40
  ) {
37
41
  super();
@@ -194,7 +198,7 @@ export class WorkflowAutomationService extends EntityServiceImpl {
194
198
  existing.payload = a.actionPayload ?? {};
195
199
  existing.actioncategoryname =
196
200
  a.actionCategoryName ?? existing.actioncategoryname;
197
- existing.status = a.status ?? existing.status;
201
+ existing.status = a.status ?? existing.status;
198
202
  await this.dataSource
199
203
  .getRepository(WorkflowAutomationActionEntity)
200
204
  .save(existing);
@@ -326,6 +330,15 @@ export class WorkflowAutomationService extends EntityServiceImpl {
326
330
  `Registering schedule automation for workflow ${workflow.id}`,
327
331
  );
328
332
 
333
+ // Check if WorkflowScheduleService is available (it's optional for package imports)
334
+ if (!this.workflowScheduleService) {
335
+ this.logger.warn(
336
+ `WorkflowScheduleService not available. Skipping schedule registration for workflow ${workflow.id}. ` +
337
+ `Make sure WorkflowScheduleModule is imported if you need scheduling functionality.`,
338
+ );
339
+ return;
340
+ }
341
+
329
342
  const scheduleJson = workflow.schedule;
330
343
  if (!scheduleJson) {
331
344
  this.logger.warn(`No schedule JSON provided for workflow ${workflow.id}`);