Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
production
building-knowledge-centre
building-dao
Commits
d3f49d65
Commit
d3f49d65
authored
Sep 24, 2019
by
Marc-Andre Santune
Browse files
import registry in __init__
parent
1f76acde
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
building_dao/__init__.py
building_dao/__init__.py
+4
-1
building_dao/building_generic.py
building_dao/building_generic.py
+1
-5
No files found.
building_dao/__init__.py
View file @
d3f49d65
from
.building_generic
import
BuildingGeneric
,
VersionConflictError
\ No newline at end of file
from
.building_generic
import
BuildingGeneric
,
VersionConflictError
from
MaxIcsRegistry
import
MaxIcsRegistry
registry
=
MaxIcsRegistry
.
from_env
(
staging
=
False
)
\ No newline at end of file
building_dao/building_generic.py
View file @
d3f49d65
...
...
@@ -6,21 +6,17 @@ from typing import Optional
import
requests
from
requests.exceptions
import
HTTPError
from
MaxIcsRegistry
import
MaxIcsRegistry
from
retrying
import
retry
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"
)
MAX_RETRIES
=
5
# max retries number
WAIT_BETWEEN_RETRIES_IN_MS
=
200
# time between each retry
class
VersionConflictError
(
Exception
):
"""Raised when there is a version conflict when updating ES doc"""
pass
class
BuildingGeneric
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment