add env variable for interval time

This commit is contained in:
René Schimmelpfennig 2024-03-27 19:58:36 +01:00
parent 333d26ada6
commit 927387ffb5
No known key found for this signature in database
GPG key ID: EABA8F8CCF842F0B

View file

@ -92,4 +92,4 @@ async function fetchNewPosts() {
fetchNewPosts();
// Fetch new posts every 5 minutes (adjust as needed)
setInterval(fetchNewPosts, 2 * 60 * 1000);
setInterval(fetchNewPosts, (process.env.INTERVAL_MINUTES ?? 5) * 60 * 1000);