Commit d3f49d65 authored by Marc-Andre Santune's avatar Marc-Andre Santune
Browse files

import registry in __init__

parent 1f76acde
from .building_generic import BuildingGeneric, VersionConflictError from .building_generic import BuildingGeneric, VersionConflictError
from MaxIcsRegistry import MaxIcsRegistry
registry = MaxIcsRegistry.from_env(staging=False)
\ No newline at end of file
...@@ -6,21 +6,17 @@ from typing import Optional ...@@ -6,21 +6,17 @@ from typing import Optional
import requests import requests
from requests.exceptions import HTTPError from requests.exceptions import HTTPError
from MaxIcsRegistry import MaxIcsRegistry
from retrying import retry from retrying import retry
from simplejson import JSONDecodeError from simplejson import JSONDecodeError
from . import registry
# os.environ['MESOS_TASK_ID'] = "maxics_wind-vulnerability-0_google-street-view-image-poller.6f22b79d-73ae-11e8-8774-0242b35465ae"
registry = MaxIcsRegistry.from_env(staging=False)
building_center_info = registry.get_info("building-knowledge-information-center") building_center_info = registry.get_info("building-knowledge-information-center")
MAX_RETRIES = 5 # max retries number MAX_RETRIES = 5 # max retries number
WAIT_BETWEEN_RETRIES_IN_MS = 200 # time between each retry WAIT_BETWEEN_RETRIES_IN_MS = 200 # time between each retry
class VersionConflictError(Exception): class VersionConflictError(Exception):
"""Raised when there is a version conflict when updating ES doc""" """Raised when there is a version conflict when updating ES doc"""
pass pass
class BuildingGeneric: class BuildingGeneric:
......
Markdown is supported
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