@zintrust/workers 2.4.5 → 2.4.6

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.
@@ -1,10 +1,10 @@
1
- import { Cloudflare, Env, queueConfig } from '@zintrust/core/config';
1
+ import { Cloudflare, Env, FeatureFlags, queueConfig } from '@zintrust/core/config';
2
2
  import { ErrorFactory } from '@zintrust/core/errors';
3
3
  import { Logger } from '@zintrust/core/logger';
4
+ import { SLAMonitor } from '../SLAMonitor.js';
4
5
  import { WorkerFactory } from '../WorkerFactory.js';
5
6
  import { WorkerMetrics as WorkerMetricsManager } from '../WorkerMetrics.js';
6
7
  import { WorkerRegistry } from '../WorkerRegistry.js';
7
- import { SLAMonitor } from '../SLAMonitor.js';
8
8
  import { maskInfrastructurePasswords } from '../helper/index.js';
9
9
  import { getWorkerManifestEntries, getWorkerManifestQueueNames, getWorkerManifestRecord, } from './workerManifest.js';
10
10
  const DEFAULT_PAGE_SIZE = 100;
@@ -868,6 +868,9 @@ const resolvePersistenceOverride = (driver) => {
868
868
  return { driver: 'memory' };
869
869
  };
870
870
  const getWorkerHealthSnapshot = async (name, fallback) => {
871
+ if (!FeatureFlags.isWorkerDetailsLiveHealthEnabled()) {
872
+ return fallback;
873
+ }
871
874
  try {
872
875
  const health = (await WorkerFactory.getHealth(name));
873
876
  if (health && typeof health.status === 'string') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zintrust/workers",
3
- "version": "2.4.5",
3
+ "version": "2.4.6",
4
4
  "description": "Worker orchestration and background job management for ZinTrust.",
5
5
  "private": false,
6
6
  "type": "module",
@@ -1,10 +1,10 @@
1
- import { Cloudflare, Env, queueConfig } from '@zintrust/core/config';
1
+ import { Cloudflare, Env, FeatureFlags, queueConfig } from '@zintrust/core/config';
2
2
  import { ErrorFactory } from '@zintrust/core/errors';
3
3
  import { Logger } from '@zintrust/core/logger';
4
+ import { SLAMonitor } from '../SLAMonitor';
4
5
  import { WorkerFactory } from '../WorkerFactory';
5
6
  import { WorkerMetrics as WorkerMetricsManager } from '../WorkerMetrics';
6
7
  import { WorkerRegistry } from '../WorkerRegistry';
7
- import { SLAMonitor } from '../SLAMonitor';
8
8
  import { maskInfrastructurePasswords } from '../helper';
9
9
  import type { WorkerRecord } from '../storage/WorkerStore';
10
10
  import type {
@@ -1120,6 +1120,10 @@ const getWorkerHealthSnapshot = async (
1120
1120
  name: string,
1121
1121
  fallback: WorkerHealth
1122
1122
  ): Promise<WorkerHealth> => {
1123
+ if (!FeatureFlags.isWorkerDetailsLiveHealthEnabled()) {
1124
+ return fallback;
1125
+ }
1126
+
1123
1127
  try {
1124
1128
  const health = (await WorkerFactory.getHealth(name)) as WorkerHealth | null;
1125
1129
  if (health && typeof health.status === 'string') {