mirror of
https://github.com/solero/houdini.git
synced 2024-11-13 22:28:21 +00:00
Experimental crumb loading
This commit is contained in:
parent
30f1f1fb7f
commit
5b8b574198
@ -21,6 +21,8 @@ from aiocache import SimpleMemoryCache
|
||||
from watchdog.observers import Observer
|
||||
|
||||
from Houdini.Data import db
|
||||
from Houdini.Data.Stamp import Stamp
|
||||
from Houdini.Data.Room import Room
|
||||
|
||||
try:
|
||||
import uvloop
|
||||
@ -55,6 +57,10 @@ class HoudiniFactory:
|
||||
self.penguins_by_username = {}
|
||||
|
||||
self.xt_listeners, self.xml_listeners = {}, {}
|
||||
self.plugins = {}
|
||||
|
||||
self.stamps = []
|
||||
self.rooms = []
|
||||
|
||||
async def start(self):
|
||||
self.config = config
|
||||
@ -130,6 +136,11 @@ class HoudiniFactory:
|
||||
self.load_handler_modules("Houdini.Handlers.Login.Login")
|
||||
self.logger.info('Login server started')
|
||||
|
||||
self.stamps = await db.all(Stamp.query)
|
||||
self.rooms = await Room.query.gino.all()
|
||||
self.logger.info('Loaded %d stamps', len(self.stamps))
|
||||
self.logger.info('Loaded %d rooms', len(self.rooms))
|
||||
|
||||
handlers_path = './Houdini{}Handlers'.format(os.path.sep)
|
||||
plugins_path = './Houdini{}Plugins'.format(os.path.sep)
|
||||
self.configure_obvservers([handlers_path, HandlerFileEventHandler])
|
||||
|
Loading…
Reference in New Issue
Block a user