Adjust delivery job timeouts
ci/woodpecker/tag/ociImageTag Pipeline was successful Details

This commit is contained in:
Natty 2024-12-24 14:33:06 +01:00
parent b6bc717416
commit 5f4ab23b8d
2 changed files with 5 additions and 5 deletions

View File

@ -26,7 +26,7 @@ async function getRpcClient(): Promise<Socket> {
}
client = new Socket();
client.setMaxListeners(1024);
client.setMaxListeners(10240);
const [host, portStr] = config.rpcHost.trim().split(/:(?=[0-9]+$)/, 2);
const port = parseInt(portStr);
@ -82,7 +82,7 @@ async function getRpcClient(): Promise<Socket> {
const data = buf.readBuffer(dataLen);
dataDecoded = decode(data);
} else {
dataDecoded = { success: false, data: "RPC returned failure" };
dataDecoded = {success: false, data: "RPC returned failure"};
}
// Move the rest of the data to the beginning of the buffer
@ -99,7 +99,7 @@ async function getRpcClient(): Promise<Socket> {
const reconnectWithBackoff = () => {
client!.destroy();
client = new Socket();
client.setMaxListeners(1024);
client.setMaxListeners(10240);
setTimeout(() => createClient(client!), 1000 * (1 + Math.pow(1.5, exponentialBackoff)));
};
@ -139,7 +139,7 @@ async function rpcCall<D, T>(method: string, data: D): Promise<T> {
client.off("error", clearAndReject);
client.removeAllListeners(`mag-data:${currentSerial}`);
reject(new Error("Promise timeout"))
}, 60000);
}, 75000);
const clearAndReject = (e: any) => {
clearTimeout(timeout);

View File

@ -171,7 +171,7 @@ export function deliver(user: ThinUser, content: unknown, to: string | null) {
return deliverQueue.add(data, {
attempts: config.deliverJobMaxAttempts || 12,
timeout: 60 * 1000, // 1min
timeout: 3 * 60 * 1000, // 3min
backoff: {
type: "apBackoff",
},