diff --git a/src/functions/fetchMessages.ts b/src/functions/fetchMessages.ts index ddb3af5c..89185e59 100644 --- a/src/functions/fetchMessages.ts +++ b/src/functions/fetchMessages.ts @@ -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 }, diff --git a/src/index.ts b/src/index.ts index 9452d186..902b627d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -201,7 +201,7 @@ async function app() { port: config.redis.port, password: config.redis.password, }, - lockDuration: 7200000, // 2 hour + lockDuration: 79200000, // 22 hours } );