Commit 7b8b9b54 authored by Felix Delattre's avatar Felix Delattre
Browse files

Made all rules to be executed

parent 8014b816
Pipeline #24241 passed with stage
in 1 minute and 28 seconds
......@@ -24,7 +24,9 @@ from rabotnik import Rabotnik
from rabotnik.bus import MessageBus
from rules import GetBuilding # pylint: disable=import-error
from rules import GetFloorspace # pylint: disable=import-error
from rules import GetBuildingLandUse # pylint: disable=import-error
from rules import GetPointsInBuilding # pylint: disable=import-error
rabotnik_logger = logging.getLogger("rabotnik")
rabotnik_logger.setLevel(logging.DEBUG)
......@@ -58,6 +60,15 @@ async def main():
rule = GetBuilding(storage_osmreplication, storage_obmbuildings)
await message_bus.subscribe("building", rule.evaluate)
rule = GetFloorspace(storage_osmreplication, storage_obmbuildings)
await message_bus.subscribe("building", rule.evaluate)
rule = GetBuildingLandUse(storage_osmreplication, storage_obmbuildings)
await message_bus.subscribe("building", rule.evaluate)
rule = GetPointsInBuilding(storage_osmreplication, storage_obmbuildings)
await message_bus.subscribe("building", rule.evaluate)
loop = asyncio.get_event_loop()
loop.create_task(main())
......
......@@ -18,6 +18,9 @@
from .get_building import GetBuilding
from .get_floorspace import GetFloorspace
from .get_building_land_use import GetBuildingLandUse
from .get_points_in_building import GetPointsInBuilding
__all__ = ["GetBuilding"]
__all__ = ["GetBuilding", "GetFloorspace", "GetBuildingLandUse", "GetPointsInBuilding"]
......@@ -7,7 +7,7 @@ from rabotnik import Rule # pylint: disable=import-error
logger = logging.getLogger()
class Floorspace(Rule):
class GetFloorspace(Rule):
def __init__(self, storage: RabotnikStorage):
"""Calculate floorspace of buildings.
......
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