mirror of
https://github.com/MikroWizard/mikroman.git
synced 2025-07-23 20:25:52 +02:00
Fixes #7 , Stop trying update after 3 failed attempts
This commit is contained in:
parent
d10fd8f179
commit
f2b59ea421
1 changed files with 3 additions and 0 deletions
|
@ -363,6 +363,9 @@ def apply_firmware(packages,firm2,arch,dev,router,events,q):
|
|||
dev.failed_attempt=dev.failed_attempt+1
|
||||
if dev.failed_attempt > 3:
|
||||
db_events.firmware_event(dev.id,"updater","Update Failed","Critical",0,"Unable to Update device")
|
||||
dev.save()
|
||||
q.put({"id": dev.id})
|
||||
return False
|
||||
dev.status="updating"
|
||||
dev.save()
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue