Describe the bug
Item.publish
method with future = True
parameter does not return future immediately, but waits future to finish.
To Reproduce
Steps to reproduce the behavior:
sd_item:Item = self.content.get("391ca075826f4fb9844eaa93f61b25f9") start_time = datetime.now() sd_item.publish( overwrite = True, future = True, # should not wait for the job to complete, but return future immediately ) duration = (datetime.now() - start_time).total_seconds() assert duration < 10, f"Publishing took too long: {duration} seconds"
error: script hangs and waits publish job to be finished.
Expected behavior
Expected that Future object is returned and waiting could be done by me.
Platform (please complete the following information):
Additional context
Seems, that issue is in arcgis/gis/__init__.py
file 16270 line, where code submits task and in line 16271 waits for thread pool to finish:
job: concurrent.futures.Future = tp.submit(self._publish, **params) tp.shutdown(wait=True)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4