Skip to content

Commit

Permalink
Pass tries and num_threads to RucioRemoteBackend (#1565)
Browse files Browse the repository at this point in the history
* Pass `tries` and `num_threads` to `RucioRemoteBackend`

* Minor change
  • Loading branch information
dachengx authored Feb 19, 2025
1 parent ef080c0 commit 5a23e7d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions straxen/storage/rucio_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ class RucioRemoteFrontend(strax.StorageFrontend):

def __init__(
self,
download_heavy=False,
staging_dir="./strax_data",
rses_only=tuple(),
download_heavy=False,
tries=3,
num_threads=1,
stage=False,
Expand All @@ -58,7 +58,12 @@ def __init__(
if HAVE_ADMIX:
self.backends = [
RucioRemoteBackend(
staging_dir, download_heavy=download_heavy, stage=stage, rses_only=rses_only
staging_dir=staging_dir,
rses_only=rses_only,
download_heavy=download_heavy,
tries=tries,
num_threads=num_threads,
stage=stage,
),
]
else:
Expand Down Expand Up @@ -108,8 +113,8 @@ class RucioRemoteBackend(strax.FileSytemBackend):
def __init__(
self,
staging_dir,
download_heavy=False,
rses_only=tuple(),
download_heavy=False,
tries=3,
num_threads=1,
stage=False,
Expand All @@ -136,9 +141,9 @@ def __init__(
except OSError:
raise PermissionError(mess)
super().__init__(**kwargs)
self.download_heavy = download_heavy
self.staging_dir = staging_dir
self.rses_only = strax.to_str_tuple(rses_only)
self.download_heavy = download_heavy
self.tries = tries
self.num_threads = num_threads
self.stage = stage
Expand Down

0 comments on commit 5a23e7d

Please sign in to comment.