Last active
April 29, 2025 16:13
-
-
Save SiestaMadokaist/8d72b3b5fbfe6d4bd897467fbe768353 to your computer and use it in GitHub Desktop.
action-queue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface IActionQueue<T> { | |
jobId: string; // primary key | |
currentStatus: 'pending' | 'running' | 'completed' | 'cancelled'; // GSI PK | |
priorityScore: number; // timestamp, GSI SK (default value = createdAt) can be overriden. | |
createdAt: number; // the real createdAt (although not really) | |
resource: T; | |
} | |
// IPromptParam = { seed, sampler, prompt, negative, n_iter, ... } | |
interface IGenerateQueue extends IActionQueue<IPromptParam[]> { | |
progressDone: number; | |
totalWork: number; | |
} | |
// IFetchParam = { source, protocol: 's3' | 'http', type: 'checkpoint' | 'lora' } | |
interface IFetchQueue extends IActionQueue<IFetchParam> { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment