mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-08-14 21:06:24 -05:00
fix: trello failing on degraded service
This commit is contained in:
@@ -9,10 +9,7 @@ let cache;
|
||||
async function getTrelloCache() {
|
||||
const available = await trelloAPIAvailable();
|
||||
if (!available) {
|
||||
return {
|
||||
update_time: Date.now(),
|
||||
sections: []
|
||||
};
|
||||
return cache;
|
||||
}
|
||||
|
||||
if (!cache) {
|
||||
@@ -79,7 +76,7 @@ async function updateTrelloCache() {
|
||||
|
||||
async function trelloAPIAvailable() {
|
||||
const { status } = await got('https://trello.status.atlassian.com/api/v2/status.json').json();
|
||||
return status.description === 'All Systems Operational';
|
||||
return status.indicator !== 'major' && status.indicator !== 'critical';
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
Reference in New Issue
Block a user