Skip to content

Commit

Permalink
removing time-out handling
Browse files Browse the repository at this point in the history
  • Loading branch information
shaikh-ma committed Sep 6, 2024
1 parent 45f356f commit bd23e59
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions scrunch/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2392,7 +2392,7 @@ def fork(self, description=None, name=None, is_published=False,
:returns _fork: scrunch.datasets.BaseDataset
"""
from scrunch.mutable_dataset import MutableDataset

description = description or self.resource.body.description

if name is None:
Expand All @@ -2408,7 +2408,7 @@ def fork(self, description=None, name=None, is_published=False,
is_published=is_published,
**kwargs
)

# Handling project vs owner conflict
owner = kwargs.get("owner")

Expand All @@ -2432,15 +2432,7 @@ def fork(self, description=None, name=None, is_published=False,

payload = shoji_entity_wrapper(body)

try:
_fork = self.resource.forks.create(payload).refresh()
except TaskProgressTimeoutError as exc:
# To avoid getting another timeout,
# setting timeout=None & increasing the interval.
_fork = exc.entity.wait_progress(
exc.response,
progress_tracker=DefaultProgressTracking(timeout=None, interval=10)
).refresh()
_fork = self.resource.forks.create(payload).refresh()
return MutableDataset(_fork)


Expand Down

0 comments on commit bd23e59

Please sign in to comment.