-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Distributed Excluded Zone] Handle when depart is in an excluded zone #4229
Conversation
@classmethod | ||
@cache.memoize(app.config[str('CACHE_CONFIGURATION')].get(str('ASGARD_S3_DATA_TIMEOUT'), 1 * 60)) | ||
def is_excluded(cls, obj, mode, timestamp): | ||
print(mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
??
@classmethod | ||
@cache.memoize(app.config[str('CACHE_CONFIGURATION')].get(str('ASGARD_S3_DATA_TIMEOUT'), 1 * 60)) | ||
def is_excluded(cls, obj, mode, timestamp): | ||
print(mode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print(mode) | |
print(mode) |
to remove
|
||
from jormungandr import app, memory_cache, cache | ||
from jormungandr.resource_s3_object import ResourceS3Object | ||
|
||
|
||
class ExcludedZonesManager: | ||
excluded_shapes = dict() # type: Dict[str, shapely.geometry] | ||
|
||
@staticmethod | ||
@cache.memoize(app.config[str('CACHE_CONFIGURATION')].get(str('ASGARD_S3_DATA_TIMEOUT'), 24 * 60)) | ||
def get_object(resource_s3_object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add instance_publication_date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for excluded_zones, they have nothing to do with the data of instance, it does not make sense to relate excluded_zones to instance_publication_date
) | ||
cls.excluded_shapes = [shapely.wkt.loads(zone.get('shape', '')) for zone in excluded_zones] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
load may not work, no ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to me 👍
|
https://navitia.atlassian.net/browse/NAV-2802