[modules/various] Use new interval mechanism

Use generic interval mechanism in most of the modules that use slow
updates.

Only exception: getcrypto, as the interval is specified in seconds there
and I want to retain backwards-compatibility.

fixes #220
This commit is contained in:
Tobias Witek 2018-01-07 20:27:11 +01:00
parent 776be11137
commit 3638aa2420
7 changed files with 55 additions and 79 deletions

View file

@ -31,6 +31,7 @@ class Module(bumblebee.engine.Module):
self._currencies = self.parameter('currencies', None)
self._baseurl = 'http://download.finance.yahoo.com/d/quotes.csv'
self._value = self.fetch()
self.interval(60)
if not self._currencies:
self._currencies = '$' * len(self._symbols)