[core/module] allow modules to perform updates in background
a module can now set `self.background = True` in its `__init__()` method to make sure its update method is invoked in a separate thread. also, do a PoC implementation of this for the github module. TODO: add this to dev doc see #640
This commit is contained in:
parent
a13898cbae
commit
547874dafd
2 changed files with 19 additions and 1 deletions
|
@ -34,6 +34,7 @@ class Module(core.module.Module):
|
|||
def __init__(self, config, theme):
|
||||
super().__init__(config, theme, core.widget.Widget(self.github))
|
||||
|
||||
self.background = True
|
||||
self.__count = 0
|
||||
self.__label = ""
|
||||
self.__requests = requests.Session()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue