| 171 | } |
| 172 | |
| 173 | async stop(instance: Instance) { |
| 174 | if (this.task) { |
| 175 | clearInterval(this.task); |
| 176 | this.task = null; |
| 177 | } |
| 178 | this.isUpdating = false; |
| 179 | this.lastStatsMap.clear(); |
| 180 | instance.info = { |
| 181 | ...instance.info, |
| 182 | cpuUsage: undefined, |
| 183 | rxBytes: undefined, |
| 184 | txBytes: undefined, |
| 185 | rxRate: undefined, |
| 186 | txRate: undefined, |
| 187 | networkInterfaces: undefined, |
| 188 | networkStatsSource: undefined, |
| 189 | memoryUsagePercent: undefined, |
| 190 | readBytes: undefined, |
| 191 | writeBytes: undefined, |
| 192 | storageUsage: 0, |
| 193 | storageLimit: instance.config.docker?.maxSpace ?? 0 |
| 194 | }; |
| 195 | } |
| 196 | } |