mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-25 06:36:49 +09:00
Checkpoint: File edits
Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-08T00:24:39Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b9f13160d3
commit
0f880daedd
1 file changed
+16
-1
@@ -312,8 +312,23 @@ export class WorkerQueue extends EventEmitter {
|
||||
timeoutMs?: number;
|
||||
}
|
||||
): Promise<string> {
|
||||
const taskId = `task-${Date.now()}-${randomUUID().slice(0, 8)}`;
|
||||
// Initialize if needed
|
||||
if (!this.initialized) {
|
||||
await this.initialize();
|
||||
}
|
||||
|
||||
// Validate worker type
|
||||
if (!workerType || typeof workerType !== 'string') {
|
||||
throw new Error('Invalid worker type');
|
||||
}
|
||||
|
||||
// Validate priority
|
||||
const priority = options?.priority || 'normal';
|
||||
if (!['critical', 'high', 'normal', 'low'].includes(priority)) {
|
||||
throw new Error(`Invalid priority: ${priority}`);
|
||||
}
|
||||
|
||||
const taskId = `task-${Date.now()}-${randomUUID().slice(0, 8)}`;
|
||||
|
||||
const task: QueueTask = {
|
||||
id: taskId,
|
||||
|
||||
Reference in new issue
Block a user