Skip to content
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

GET Workspace Layer returns PENDING, vol. 2 #459

Closed
jirik opened this issue Sep 9, 2021 · 0 comments
Closed

GET Workspace Layer returns PENDING, vol. 2 #459

jirik opened this issue Sep 9, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@jirik
Copy link
Member

jirik commented Sep 9, 2021

Recurring #405 , version 1.13.2

If one publication task failed and Celery forgot about all tasks of such publication, Layman returns "state": "PENDING" in all sources of such publication.

sample chain_info

{'last': <AbortableAsyncResult: 6b2fc8f2-e215-4122-a78c-8e8dc538e70c>, 'by_name': {'layman.layer.db.table.refresh': <AbortableAsyncResult: b10ad72c-fc6a-4708-9f07-2a4b51f00bb3>, 'layman.layer.prime_db_schema.bbox.refresh': <AbortableAsyncResult: d425aeb2-ee45-400a-9e29-da285504f01c>, 'layman.layer.qgis.wms.refresh': <AbortableAsyncResult: 90d449e3-3109-4cef-9fe1-2035cd641b00>, 'layman.layer.geoserver.wfs.refresh': <AbortableAsyncResult: 6cf7c9d1-bbdd-433d-85c1-bcda69e62668>, 'layman.layer.geoserver.wms.refresh': <AbortableAsyncResult: e47be82c-04bd-4b4c-b521-0445a91a5995>, 'layman.layer.geoserver.sld.refresh': <AbortableAsyncResult: 78e67f32-7e53-440b-904e-331cf7e9c963>, 'layman.layer.filesystem.thumbnail.refresh': <AbortableAsyncResult: 5f32ef78-55aa-4d01-9362-67c7e8e6193f>, 'layman.layer.micka.soap.refresh': <AbortableAsyncResult: 6b2fc8f2-e215-4122-a78c-8e8dc538e70c>}, 'by_order': [<AbortableAsyncResult: b10ad72c-fc6a-4708-9f07-2a4b51f00bb3>, <AbortableAsyncResult: d425aeb2-ee45-400a-9e29-da285504f01c>, <AbortableAsyncResult: 90d449e3-3109-4cef-9fe1-2035cd641b00>, <AbortableAsyncResult: 6cf7c9d1-bbdd-433d-85c1-bcda69e62668>, <AbortableAsyncResult: e47be82c-04bd-4b4c-b521-0445a91a5995>, <AbortableAsyncResult: 78e67f32-7e53-440b-904e-331cf7e9c963>, <AbortableAsyncResult: 5f32ef78-55aa-4d01-9362-67c7e8e6193f>, <AbortableAsyncResult: 6b2fc8f2-e215-4122-a78c-8e8dc538e70c>], 'finished': True, 'state': 'FAILURE'}

sample publication info

with app.app_context():
...     layman_util.get_publication_info(workspace, 'layman.layer', layer)
... 
{'uuid': '157d0c0b-f893-4b93-bd2f-04a771822e09', 'id': 631, 'name': 'ab_dv_slavkov_dv_slavkov_vz5_5514', 'title': 'ab_dv_slavkov_dv_slavkov_vz5_5514', 'type': 'layman.layer', 'style_type': 'qml', 'updated_at': datetime.datetime(2021, 9, 9, 9, 39, 59, 167846, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)), 'bounding_box': [1870322.81512642, 6281928.49798181, 1892002.82941466, 6304200.72172059], 'access_rights': {'read': ['lay3', 'EVERYONE'], 'write': ['lay3', 'EVERYONE']}, 'file': {'path': 'layers/ab_dv_slavkov_dv_slavkov_vz5_5514/input_file/ab_dv_slavkov_dv_slavkov_vz5_5514.geojson'}, 'db_table': {'name': 'ab_dv_slavkov_dv_slavkov_vz5_5514'}, 'style': {'url': 'https://www.agrihub.cz/rest/workspaces/lay3/layers/ab_dv_slavkov_dv_slavkov_vz5_5514/style', 'type': 'qml'}}

sample result (layer info):

>>> with app.app_context():
...     util.get_layer_info(workspace, layer)
... 
{'uuid': '157d0c0b-f893-4b93-bd2f-04a771822e09', 'id': 631, 'name': 'ab_dv_slavkov_dv_slavkov_vz5_5514', 'title': 'ab_dv_slavkov_dv_slavkov_vz5_5514', 'type': 'layman.layer', 'style_type': 'qml', 'updated_at': datetime.datetime(2021, 9, 9, 9, 39, 59, 167846, tzinfo=psycopg2.tz.FixedOffsetTimezone(offset=0, name=None)), 'bounding_box': [1870322.81512642, 6281928.49798181, 1892002.82941466, 6304200.72172059], 'access_rights': {'read': ['lay3', 'EVERYONE'], 'write': ['lay3', 'EVERYONE']}, 'file': {'path': 'layers/ab_dv_slavkov_dv_slavkov_vz5_5514/input_file/ab_dv_slavkov_dv_slavkov_vz5_5514.geojson'}, 'db_table': {'status': 'PENDING'}, 'style': {'status': 'PENDING'}, 'wfs': {'status': 'PENDING'}, 'wms': {'status': 'PENDING'}, 'thumbnail': {'status': 'PENDING'}, 'metadata': {'status': 'PENDING'}}
@jirik jirik added the bug Something isn't working label Sep 9, 2021
@jirik jirik added this to the Release 1.15 milestone Sep 9, 2021
@index-git index-git mentioned this issue Sep 9, 2021
2 tasks
@jirik jirik modified the milestones: Release 1.15, Release v1.14.1 Sep 14, 2021
@jirik jirik closed this as completed Sep 14, 2021
@index-git index-git mentioned this issue Sep 14, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant