rewritting the dating optimization services management (refs #319)
This commit is contained in:
parent
d7fa7ce5ae
commit
fcabbbe19f
5 changed files with 229 additions and 81 deletions
|
|
@ -29,6 +29,7 @@ class Visibility(Optimization):
|
|||
def __init__(self, sched, browser):
|
||||
self.sched = sched
|
||||
self.browser = browser
|
||||
self.cron = None
|
||||
|
||||
def start(self):
|
||||
self.cron = self.sched.repeat(60*5, self.reconnect)
|
||||
|
|
@ -38,6 +39,9 @@ class Visibility(Optimization):
|
|||
# TODO
|
||||
return False
|
||||
|
||||
def is_running(self):
|
||||
return self.cron is not None
|
||||
|
||||
def reconnect(self):
|
||||
try:
|
||||
AuMBrowser(self.browser.username,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue