parent
be23532cda
commit
423be1333f
2 changed files with 4 additions and 1 deletions
|
@ -19,6 +19,7 @@ def get_conf(prefix='LARIGIRA_'):
|
|||
conf['SECRET_KEY'] = 'Please replace me!'
|
||||
conf['MPD_WAIT_START'] = True
|
||||
conf['MPD_WAIT_START_RETRYSECS'] = 5
|
||||
conf['CHECK_SECS'] = 20
|
||||
conf.update(from_envvars(prefix=prefix))
|
||||
return conf
|
||||
|
||||
|
|
|
@ -68,7 +68,9 @@ class Player(gevent.Greenlet):
|
|||
|
||||
def _run(self):
|
||||
MpcWatcher(self.q, self.conf, client=None).start()
|
||||
Timer(60 * 1000, self.q).start()
|
||||
Timer(int(self.conf['CHECK_SECS']) * 1000, self.q).start()
|
||||
# at the very start, run a check!
|
||||
gevent.Greenlet.spawn(self.check_playlist)
|
||||
while True:
|
||||
value = self.q.get()
|
||||
self.log.debug('<- %s' % str(value))
|
||||
|
|
Loading…
Reference in a new issue