Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/cancel-pending-tx.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ async function getMessagesInMempool (f4addr) {
const res = await pRetry(
() => fetch(`https://filfox.info/api/v1/message/mempool/filtered-list?address=${f4addr}&pageSize=1000`),
{
async onFailedAttempt (error) {
console.warn(error)
async onFailedAttempt (ctx) {
console.warn(ctx)
console.warn('Filfox request failed. Retrying...')
}
}
Expand Down
4 changes: 2 additions & 2 deletions lib/evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ export const evaluate = async ({
await pRetry(
() => prepareProviderRetrievalResultStats(round, committees),
{
async onFailedAttempt (error) {
console.warn(error)
async onFailedAttempt (ctx) {
console.warn(ctx)
console.warn(
'Preparing provider retrieval result stats failed. Retrying...'
)
Expand Down
2 changes: 1 addition & 1 deletion lib/platform-stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export const updateTopMeasurementParticipants = async (pgClient) => {
await pgClient.query('REFRESH MATERIALIZED VIEW top_measurement_participants_yesterday_mv')
}, {
retries: 3,
onFailedAttempt: (error) => {
onFailedAttempt: ({ error }) => {
console.warn(`Attempt to refresh materialized view failed: ${error.message}. Retrying...`)
}
})
Expand Down
6 changes: 3 additions & 3 deletions lib/preprocess.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ export const preprocess = async ({
attempt => fetchMeasurements(cid, { noCache: attempt > 1 }),
{
retries: fetchRetries,
onFailedAttempt: err => {
onFailedAttempt: ctx => {
if (!fetchRetries) return
console.error(err)
console.error(`Retrying ${cid} ${err.retriesLeft} more times`)
console.error(ctx)
console.error(`Retrying ${cid} ${ctx.retriesLeft} more times`)
}
}
)
Expand Down
27 changes: 11 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"ms": "^2.1.3",
"multiformats": "^13.4.0",
"p-map": "^7.0.3",
"p-retry": "^6.2.1",
"p-retry": "^7.0.0",
"pg": "^8.16.3",
"postgrator": "^8.0.0"
},
Expand Down