(deviceId)
| 24 | } |
| 25 | |
| 26 | get(deviceId) { |
| 27 | const now = Date.now(); |
| 28 | const diff = now - this._lastSync; |
| 29 | |
| 30 | if(diff > CHECK_TIME) { |
| 31 | return this._loadAndGet(deviceId); |
| 32 | } |
| 33 | |
| 34 | return Promise.resolve(this._get(deviceId)); |
| 35 | } |
| 36 | |
| 37 | _get(deviceId) { |
| 38 | return this._data[deviceId]; |
no test coverage detected