forked from platypush/platypush
Implemented retry mechanism
This commit is contained in:
parent
ab9e86dc25
commit
b4c445ecec
1 changed files with 6 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
import logging
|
import logging
|
||||||
|
import time
|
||||||
|
|
||||||
from phue import Bridge
|
from phue import Bridge
|
||||||
|
|
||||||
|
@ -68,6 +69,11 @@ class LightHuePlugin(LightPlugin):
|
||||||
logging.exception(e)
|
logging.exception(e)
|
||||||
# Reset bridge connection
|
# Reset bridge connection
|
||||||
self.bridge = None
|
self.bridge = None
|
||||||
|
|
||||||
|
if 'is_retry' not in kwargs:
|
||||||
|
time.sleep(1)
|
||||||
|
self._execute(attr, is_retry=True, *args, **kwargs)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
lights = []; groups = []
|
lights = []; groups = []
|
||||||
|
|
Loading…
Reference in a new issue