@onlineapps/infrastructure-tools 1.0.20 → 1.0.22

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": "@onlineapps/infrastructure-tools",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "Infrastructure orchestration utilities for OA Drive infrastructure services (health tracking, queue initialization, service discovery)",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
23
  "@onlineapps/mq-client-core": "^1.0.38",
24
- "@onlineapps/service-common": "^1.0.3",
24
+ "@onlineapps/service-common": "^1.0.4",
25
25
  "uuid": "^9.0.1"
26
26
  },
27
27
  "devDependencies": {
@@ -48,7 +48,6 @@ async function initInfrastructureQueues(channel, options = {}) {
48
48
  'workflow.dlq',
49
49
  // Registry infrastructure queues
50
50
  'registry.register',
51
- 'registry.heartbeats'
52
51
  ];
53
52
 
54
53
  const watchChannel = (ch) => {
@@ -84,8 +83,10 @@ async function initInfrastructureQueues(channel, options = {}) {
84
83
 
85
84
  for (const queueName of queuesToCreate) {
86
85
  try {
86
+ logger.log(`[QueueInit] Processing queue: ${queueName}...`);
87
87
  // Verify it's an infrastructure queue
88
88
  const isInfra = queueConfig.isInfrastructureQueue(queueName);
89
+ logger.log(`[QueueInit] isInfrastructureQueue("${queueName}"): ${isInfra}`);
89
90
  if (!isInfra) {
90
91
  logger.warn(`[QueueInit] Skipping ${queueName} - not an infrastructure queue (isInfrastructureQueue returned: ${isInfra})`);
91
92
  // Debug: log the actual function code to verify it's the right version
@@ -94,7 +95,9 @@ async function initInfrastructureQueues(channel, options = {}) {
94
95
  }
95
96
 
96
97
  // Get unified configuration
98
+ logger.log(`[QueueInit] Getting config for ${queueName}...`);
97
99
  const config = queueConfig.getInfrastructureQueueConfig(queueName);
100
+ logger.log(`[QueueInit] Config for ${queueName}:`, JSON.stringify(config));
98
101
 
99
102
  // CRITICAL: First check if queue exists and what parameters it has
100
103
  // This prevents 406 errors by proactively deleting queues with wrong parameters
@@ -142,7 +145,7 @@ async function initInfrastructureQueues(channel, options = {}) {
142
145
  } catch (checkError) {
143
146
  // Queue doesn't exist - will be created
144
147
  queueExists = false;
145
- logger.log(`[QueueInit] Queue ${queueName} does not exist - will be created`);
148
+ logger.log(`[QueueInit] Queue ${queueName} does not exist (${checkError.code || checkError.message}) - will be created`);
146
149
  // Close check channel if queue doesn't exist
147
150
  if (checkChannelForDelete) {
148
151
  try {
@@ -197,9 +200,16 @@ async function initInfrastructureQueues(channel, options = {}) {
197
200
  };
198
201
 
199
202
  try {
203
+ logger.log(`[QueueInit] Calling assertQueue for ${queueName}...`);
200
204
  await ensureQueue();
201
205
  logger.log(`[QueueInit] ✓ Created/verified infrastructure queue: ${queueName}`);
202
206
  } catch (assertError) {
207
+ logger.error(`[QueueInit] ✗ Failed to create/verify queue ${queueName}:`, {
208
+ error: assertError.message,
209
+ code: assertError.code,
210
+ classId: assertError.classId,
211
+ methodId: assertError.methodId
212
+ });
203
213
  if (assertError.code === 406) {
204
214
  if (alertOnMismatch) {
205
215
  try {