Skip to content

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed Aug 26, 2024
1 parent 221ee0d commit 05483a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/controllers/systems.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ async function load_systems(systemClients) {

exports.get_systems = async function (req, res) {
if ((systemList.length == 0) || (systemListTime < (Date.now() - 60 * 1000 * 2))) {
systemListTime = Date.now(); // set this first to prevent multiple calls to load_systems
await load_systems(req.systemClients);
systemListTime = Date.now();
}

res.contentType('json');
Expand Down

0 comments on commit 05483a7

Please sign in to comment.