Created
February 6, 2018 01:18
-
-
Save andrewthetechie/15ec9bb90fb022b2f720170f27d3cdef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from threading import RLock | |
from wrapt import synchronized # https://stackoverflow.com/a/29403915 | |
# These locks are for our synchronized decorator | |
_WATCHDOG_LOCK = RLock() | |
@synchronized(_WATCHDOG_LOCK) | |
def watchdog(self): | |
self.log.debug("watchdog called") | |
def activate(self): | |
self.start_poller(150, self.watchdog, None) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment