Skip to content

Commit

Permalink
Merge pull request #132 from TogetherCrew/130-cronjob-exceeds-default…
Browse files Browse the repository at this point in the history
…-time-limit-in-bullmq-resulting-in-unwanted-retries
  • Loading branch information
cyri113 authored Oct 26, 2023
2 parents 5c98e64 + e2c5e32 commit adf3e44
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions src/functions/fetchMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,27 +152,27 @@ async function fetchMessages(
}
channel instanceof ThreadChannel
? await pushMessagesToArray(connection, messagesToStore, [...fetchedMessages.values()], {
threadId: channel.id,
threadName: channel.name,
channelId: channel.parent?.id,
channelName: channel.parent?.name,
})
threadId: channel.id,
threadName: channel.name,
channelId: channel.parent?.id,
channelName: channel.parent?.name,
})
: await pushMessagesToArray(connection, messagesToStore, [...fetchedMessages.values()]);
break;
}

channel instanceof ThreadChannel
? await pushMessagesToArray(connection, messagesToStore, [...fetchedMessages.values()], {
threadId: channel.id,
threadName: channel.name,
channelId: channel.parent?.id,
channelName: channel.parent?.name,
})
threadId: channel.id,
threadName: channel.name,
channelId: channel.parent?.id,
channelName: channel.parent?.name,
})
: await pushMessagesToArray(connection, messagesToStore, [...fetchedMessages.values()]);
await rawInfoService.createRawInfos(connection, messagesToStore);
options[fetchDirection] = boundaryMessage.id;
fetchedMessages = await channel.messages.fetch(options);
}
await rawInfoService.createRawInfos(connection, messagesToStore);
} catch (err) {
logger.error(
{ guild_id: connection.name, channel_id: channel.id, fetchDirection, err },
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ async function app() {
port: config.redis.port,
password: config.redis.password,
},
lockDuration: 7200000, // 2 hour
lockDuration: 79200000, // 22 hours
}
);

Expand Down

0 comments on commit adf3e44

Please sign in to comment.