| Conditions | 2 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | '''shut down a miner''' |
||
| 8 | def when_shutdown(channel, method, properties, body): |
||
| 9 | msg = SHUTDOWN.app.messagedecodeminer(body) |
||
| 10 | miner = msg.miner |
||
| 11 | minercommand = msg.command |
||
| 12 | #sanity check |
||
| 13 | if minercommand.command == 'shutdown': |
||
| 14 | #here you implement specific logic to shutdown your miner |
||
| 15 | shutdown(miner, SHUTDOWN.app.sshlogin()) |
||
| 16 | |||
| 23 |