()
| 52 | await sendSystemMessage(workerId, 'Going to sleep mode. You can wake me up at any time.'); |
| 53 | await notifyTermination(workerId, 'sleeping', ''); |
| 54 | // Update instance status to stopped in DynamoDB before stopping the instance |
| 55 | await updateInstanceStatus(workerId, 'stopped'); |
| 56 | await stopMyself(workerId); |
| 57 | }, |
| 58 | 30 * 60 * 1000 |
| 59 | ); |
| 60 | }; |
| 61 | |
| 62 | let restartToken = ''; |
| 63 | let hasWorkedBefore = false; |
| 64 | |
| 65 | export const pauseKillTimer = () => { |
| 66 | restartToken = randomBytes(8).toString('hex'); |
no outgoing calls
no test coverage detected