mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-11-11 23:31:18 +00:00
Merge branch 'main' into agents/daily/style-agent-7331917025368212480
This commit is contained in:
11 files changed
+22
-59
No files matched your search
@@ -51,15 +51,6 @@ export async function getCompletedAgents(cadence, logDir, deps) {
|
||||
return completed;
|
||||
}
|
||||
|
||||
export function withTimeout(promise, timeoutMs, timeoutMessage) {
|
||||
let timeoutHandle;
|
||||
const timeoutPromise = new Promise((_, reject) => {
|
||||
timeoutHandle = setTimeout(() => reject(new Error(timeoutMessage)), timeoutMs);
|
||||
});
|
||||
return Promise.race([promise, timeoutPromise]).finally(() => {
|
||||
if (timeoutHandle) clearTimeout(timeoutHandle);
|
||||
});
|
||||
}
|
||||
|
||||
const MAX_RANDOM = 281474976710655; // 2**48 - 1
|
||||
|
||||
|
||||
Reference in new issue
Block a user