gbos 1.3.15 → 1.3.16

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": "gbos",
3
- "version": "1.3.15",
3
+ "version": "1.3.16",
4
4
  "description": "GBOS - Command line interface for GBOS services",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -219,7 +219,13 @@ async function nextTaskCommand() {
219
219
  const task = response.data;
220
220
 
221
221
  if (!task) {
222
- console.log(`${DIM}No pending tasks available.${RESET}\n`);
222
+ if (response.pending_tasks_count > 0) {
223
+ console.log(`${DIM}${response.message || 'No tasks assigned to this node.'}${RESET}`);
224
+ console.log(`${DIM}Pending tasks in queue: ${response.pending_tasks_count}${RESET}`);
225
+ console.log(`${DIM}Tasks may need to be assigned to this node from the GBOS dashboard.${RESET}\n`);
226
+ } else {
227
+ console.log(`${DIM}No pending tasks available.${RESET}\n`);
228
+ }
223
229
  return;
224
230
  }
225
231
 
@@ -271,13 +277,20 @@ async function continueCommand() {
271
277
  }
272
278
 
273
279
  // If no current task, get next task
280
+ let nextResponse;
274
281
  if (!task) {
275
- const response = await api.getNextTask();
276
- task = response.data;
282
+ nextResponse = await api.getNextTask();
283
+ task = nextResponse.data;
277
284
  }
278
285
 
279
286
  if (!task) {
280
- console.log(`${DIM}No tasks available to continue.${RESET}\n`);
287
+ if (nextResponse && nextResponse.pending_tasks_count > 0) {
288
+ console.log(`${DIM}${nextResponse.message || 'No tasks assigned to this node.'}${RESET}`);
289
+ console.log(`${DIM}Pending tasks in queue: ${nextResponse.pending_tasks_count}${RESET}`);
290
+ console.log(`${DIM}Tasks may need to be assigned to this node from the GBOS dashboard.${RESET}\n`);
291
+ } else {
292
+ console.log(`${DIM}No tasks available to continue.${RESET}\n`);
293
+ }
281
294
  return;
282
295
  }
283
296