Refactor Agora into sources
parent
8bec00d825
commit
cb15346a78
@ -0,0 +1,40 @@
|
||||
# Project imports
|
||||
# from settings import settings
|
||||
import util
|
||||
import sources.agora
|
||||
|
||||
# import sources.localbitcoins
|
||||
|
||||
|
||||
class Sources(util.Base):
|
||||
"""
|
||||
Class to manage calls to various sources.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.agora = sources.agora.Agora()
|
||||
# self.localbitcoins = sources.localbitcoins.LocalBitcoins()
|
||||
|
||||
def __irc_started__(self):
|
||||
self.agora.setup_loop()
|
||||
# self.localbitcoins.setup_loop()
|
||||
|
||||
def __xmerged__(self):
|
||||
"""
|
||||
Called when xmerge has been completed in the webapp.
|
||||
Merge all instances into child classes.
|
||||
"""
|
||||
init_map = {
|
||||
"ux": self.ux,
|
||||
"agora": self.agora,
|
||||
"markets": self.markets,
|
||||
"sinks": self.sinks,
|
||||
"sources": self,
|
||||
"tx": self.tx,
|
||||
"webapp": self.webapp,
|
||||
"money": self.money,
|
||||
"irc": self.irc,
|
||||
"notify": self.notify,
|
||||
}
|
||||
util.xmerge_attrs(init_map)
|
Loading…
Reference in New Issue