fix
This commit is contained in:
parent
e8bb671803
commit
15ff3bd393
1 changed files with 3 additions and 8 deletions
|
@ -15,9 +15,7 @@ let lastGithubFeedUpdate;
|
||||||
updateGithubFeed();
|
updateGithubFeed();
|
||||||
|
|
||||||
// Update the feed every 5 minutes
|
// Update the feed every 5 minutes
|
||||||
setInterval(async () => {
|
setInterval(() => { updateGithubFeed(); }, 5 * 60 * 1000);
|
||||||
githubFeed = await updateGithubFeed();
|
|
||||||
}, 5 * 60 * 1000);
|
|
||||||
|
|
||||||
// P R O G R A M
|
// P R O G R A M
|
||||||
|
|
||||||
|
@ -315,21 +313,18 @@ async function updateGithubFeed() {
|
||||||
let response;
|
let response;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
lastGithubFeedUpdate = new Date();
|
|
||||||
|
|
||||||
response = await fetch(`https://api.github.com/orgs/lbryfoundation/events`, process.env.GITHUB_TOKEN && {
|
response = await fetch(`https://api.github.com/orgs/lbryfoundation/events`, process.env.GITHUB_TOKEN && {
|
||||||
headers: {
|
headers: {
|
||||||
'Authorization': `Bearer ${process.env.GITHUB_TOKEN}`
|
'Authorization': `Bearer ${process.env.GITHUB_TOKEN}`
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
githubFeed = await response.json();
|
githubFeed = await response.json();
|
||||||
|
lastGithubFeedUpdate = new Date();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue