mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-08-31 13:01:14 +00:00
cache last heartbeat list in memory
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
class LimitArray {
|
||||
limit = 100;
|
||||
array = [];
|
||||
|
||||
add(item) {
|
||||
this.array.push(item);
|
||||
if (this.array.length > this.limit) {
|
||||
this.array.shift();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = LimitArray;
|
||||
Reference in New Issue
Block a user