Skip to content

Commit

Permalink
added check for the shard status check to run only once (#1706)
Browse files Browse the repository at this point in the history
* added check for the session check to run only once

* added check for the session check to run only once

---------

Co-authored-by: Ashish Jhanwar <[email protected]>
  • Loading branch information
ashishjh-bst and ashishjh-bst authored Jul 20, 2024
1 parent d18ec62 commit b9dabf9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/templates/cp_main.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ <h2 class="card-title">
{{if .ActiveGuild}}
async function runShardOfflineChecker() {
let wasOffline = await checkShardOffline();
let shardCheckerRunning = sessionStorage.getItem('isShardOfflineCheckerRunning');
if (shardCheckerRunning === 'true') {
return;
}
sessionStorage.setItem('isShardOfflineCheckerRunning', 'true');
setInterval(async () => {
const currentlyOffline = await checkShardOffline();

Expand Down

0 comments on commit b9dabf9

Please sign in to comment.