Skip to content

Commit 7bfe1c2

Browse files
Merge pull request #149 from cityofaustin/charlie/remove-async-delete
Remove records_to_agol async delete
2 parents 82c815a + 98b6d77 commit 7bfe1c2

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

services/records_to_agol.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,19 +130,13 @@ def main():
130130
Completely replace destination data. arcgis does have layer.manager.truncate()
131131
method, but this method is not supported on the parent layer of parent-child
132132
relationships. So we truncate the layer by deleting with a "where 1=1"
133-
expression. We use the "future" option to avoid request timeouts on large
134-
datasets.
133+
expression.
135134
"""
136135
logger.info("Deleting all features...")
137136
res = resilient_layer_request(
138-
layer.delete_features, {"where": "1=1", "future": True}
137+
layer.delete_features, {"where": "1=1"}
139138
)
140-
# returns a "<Future>" response class which does not appear to be documented
141-
while res._state != "FINISHED":
142-
logger.info(f"Response state: {res._state}. Sleeping for 1 second")
143-
logger.info(res._state)
144-
time.sleep(1)
145-
utils.agol.handle_response(res._result)
139+
utils.agol.handle_response(res)
146140

147141
else:
148142
"""

0 commit comments

Comments
 (0)