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 +1 -1
- package/src/commands/tasks.js +17 -4
package/package.json
CHANGED
package/src/commands/tasks.js
CHANGED
|
@@ -219,7 +219,13 @@ async function nextTaskCommand() {
|
|
|
219
219
|
const task = response.data;
|
|
220
220
|
|
|
221
221
|
if (!task) {
|
|
222
|
-
|
|
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
|
-
|
|
276
|
-
task =
|
|
282
|
+
nextResponse = await api.getNextTask();
|
|
283
|
+
task = nextResponse.data;
|
|
277
284
|
}
|
|
278
285
|
|
|
279
286
|
if (!task) {
|
|
280
|
-
|
|
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
|
|