| 4 | |
| 5 | // When the instance is running, continue to check the expiration time |
| 6 | export default class PingMinecraftServerTask implements ILifeCycleTask { |
| 7 | public status: number = 0; |
| 8 | public name: string = "TimeCheck"; |
| 9 | |
| 10 | private task?: NodeJS.Timeout; |
| 11 | |
| 12 | async start(instance: Instance) { |
| 13 | this.task = setInterval(() => { |
| 14 | instance.execPreset("refreshPlayers"); |
| 15 | }, 1000 * 60); |
| 16 | } |
| 17 | |
| 18 | async stop(instance: Instance) { |
| 19 | instance.resetPingInfo(); |
| 20 | clearInterval(this.task); |
| 21 | this.task = undefined; |
| 22 | } |
| 23 | } |
nothing calls this directly
no outgoing calls
no test coverage detected