feat: add env variable for frequency_seconds
This commit is contained in:
parent
6b83617fcb
commit
9de6fdc399
1 changed files with 5 additions and 2 deletions
|
@ -57,6 +57,10 @@ innertubeClient = await Innertube.create({
|
|||
cookie: innertubeClientCookies || undefined,
|
||||
});
|
||||
|
||||
const poTokenRefreshInterval = Deno.env.get("FREQUENCY_SECONDS") ||
|
||||
konfigStore.get("jobs.youtube_session.frequency_seconds");
|
||||
console.log("[INFO] po_token refresh interval set to", poTokenRefreshInterval);
|
||||
|
||||
if (!innertubeClientOauthEnabled) {
|
||||
if (innertubeClientJobPoTokenEnabled) {
|
||||
innertubeClient = await poTokenGenerate(
|
||||
|
@ -80,8 +84,7 @@ if (!innertubeClientOauthEnabled) {
|
|||
});
|
||||
}
|
||||
},
|
||||
konfigStore.get("jobs.youtube_session.frequency_seconds") as number *
|
||||
1000 || 50000,
|
||||
poTokenRefreshInterval as number * 1000 || 50000,
|
||||
);
|
||||
} else if (innertubeClientOauthEnabled) {
|
||||
// Fired when waiting for the user to authorize the sign in attempt.
|
||||
|
|
Reference in a new issue