Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit e699026

Browse files
committed
shorten max sleep interval, add debug log
1 parent 2284491 commit e699026

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

data_diff/cloud/datafold_api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
import pydantic
77
import requests
88

9+
from ..utils import getLogger
10+
11+
logger = getLogger(__name__)
912

1013
Self = TypeVar("Self", bound=pydantic.BaseModel)
1114

@@ -216,11 +219,12 @@ def poll_data_diff_results(self, diff_id: int) -> TCloudApiDataDiffSummaryResult
216219
summary_results = None
217220
start_time = time.monotonic()
218221
sleep_interval = 5 # starts at 5 sec
219-
max_sleep_interval = 60
222+
max_sleep_interval = 30
220223
max_wait_time = 300
221224

222225
diff_url = f"{self.host}/datadiffs/{diff_id}/overview"
223226
while not summary_results:
227+
logger.debug(f"Polling: {diff_url}")
224228
response = self.make_get_request(url=f"api/v1/datadiffs/{diff_id}/summary_results")
225229
response_json = response.json()
226230
if response_json["status"] == "success":

0 commit comments

Comments
 (0)