refactor: use helpers.log

This commit is contained in:
Barış Soner Uşaklı
2024-12-25 09:00:12 -05:00
parent fa81078a89
commit 40257663a8

View File

@@ -339,7 +339,7 @@ async function sendMessage(uri, id, type, payload, attempts = 1) {
throw new Error(String(body)); throw new Error(String(body));
} }
} catch (e) { } catch (e) {
winston.warn(`[activitypub/send] Could not send ${payload.type} to ${uri}; error: ${e.message}`); ActivityPub.helpers.log(`[activitypub/send] Could not send ${payload.type} to ${uri}; error: ${e.message}`);
// add to retry queue // add to retry queue
if (attempts < 12) { // stop attempting after ~2 months if (attempts < 12) { // stop attempting after ~2 months
const timeout = (4 ** attempts) * 1000; // exponential backoff const timeout = (4 ** attempts) * 1000; // exponential backoff