fix: maxRetries set to 3
since max limit is 3
This commit is contained in:
@@ -183,8 +183,10 @@ app.openapi(route, async (c) => {
|
|||||||
const isAnifyEnabled = readEnvVariable<boolean>(c.env, "ENABLE_ANIFY");
|
const isAnifyEnabled = readEnvVariable<boolean>(c.env, "ENABLE_ANIFY");
|
||||||
let result: FetchUrlResponse | null;
|
let result: FetchUrlResponse | null;
|
||||||
if (provider) {
|
if (provider) {
|
||||||
|
console.log(`Fetching sources from ${provider} for ${aniListId}`);
|
||||||
result = await fetchEpisodeUrl(provider, id, aniListId, isAnifyEnabled);
|
result = await fetchEpisodeUrl(provider, id, aniListId, isAnifyEnabled);
|
||||||
} else {
|
} else {
|
||||||
|
console.log(`Fetching sources from all providers for ${aniListId}`);
|
||||||
const { fetchUrlResult } = await fetchEpisodeUrlFromAllProviders(
|
const { fetchUrlResult } = await fetchEpisodeUrlFromAllProviders(
|
||||||
aniListId,
|
aniListId,
|
||||||
episodeNumber!,
|
episodeNumber!,
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export async function maybeScheduleNextAiringEpisode(
|
|||||||
const { messageId } = await client.publishJSON({
|
const { messageId } = await client.publishJSON({
|
||||||
url: `${domain}/internal/new-episode`,
|
url: `${domain}/internal/new-episode`,
|
||||||
body: { aniListId, episodeNumber: nextEpisode },
|
body: { aniListId, episodeNumber: nextEpisode },
|
||||||
retries: 6,
|
retries: 3,
|
||||||
notBefore: airingAt,
|
notBefore: airingAt,
|
||||||
});
|
});
|
||||||
await Promise.allSettled([
|
await Promise.allSettled([
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ async function triggerNextEpisodeRoute(titleId: number) {
|
|||||||
aniListId: titleId,
|
aniListId: titleId,
|
||||||
episodeNumber: mostRecentEpisodeNumber,
|
episodeNumber: mostRecentEpisodeNumber,
|
||||||
},
|
},
|
||||||
retries: 6,
|
retries: 3,
|
||||||
})
|
})
|
||||||
.then(() => true)
|
.then(() => true)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
@@ -124,7 +124,7 @@ async function triggerNextEpisodeRoute(titleId: number) {
|
|||||||
aniListId: titleId,
|
aniListId: titleId,
|
||||||
episodeNumber: title.nextAiringEpisode.episode,
|
episodeNumber: title.nextAiringEpisode.episode,
|
||||||
},
|
},
|
||||||
retries: 6,
|
retries: 3,
|
||||||
notBefore: title.nextAiringEpisode.airingAt,
|
notBefore: title.nextAiringEpisode.airingAt,
|
||||||
})
|
})
|
||||||
.then(() => true)
|
.then(() => true)
|
||||||
|
|||||||
Reference in New Issue
Block a user