Commit 976aefde authored by Marius Kriegerowski's avatar Marius Kriegerowski
Browse files

make rule imports absolute and expose celery app

parent 99ce0cb5
Pipeline #29862 passed with stage
in 2 minutes and 17 seconds
......@@ -24,10 +24,11 @@ import argparse
from rabotnik import Rabotnik, Assembly
from rabotnik.bus import MessageBus
from .rules import GetBuilding
from .rules import GetFloorspace
from .rules import GetBuildingLandUse
from .rules import GetPointsInBuilding
# These need to be absolute imports. Otherwise, celery will fail to load them
from rabotnikobm.rules import GetBuilding
from rabotnikobm.rules import GetFloorspace
from rabotnikobm.rules import GetBuildingLandUse
from rabotnikobm.rules import GetPointsInBuilding
logger = logging.getLogger(__name__)
......@@ -36,6 +37,9 @@ logger = logging.getLogger(__name__)
# Initiate the rabotnik
rabotnik = Rabotnik("rabotnik-obm")
# Celery entrypoint
celery = rabotnik.processor # noqa
async def connected_message_bus(config_message_bus):
# Initiate the message bus
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment