Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
onuratakan committed May 24, 2024
1 parent 9de51eb commit 7873e16
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions upsonic/remote/on_prem.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ def load_module(self, module_name, version=None):
import traceback
import types


encryption_key = "u"
version_check_pass = multiprocessing.Manager().Value('b', False)
the_all = self.get_all()
Expand Down Expand Up @@ -485,13 +486,18 @@ def process_item(i):
if version in version_list:
try:
data = self.get(original_i, version, pass_python_version_control=True)
print(f"[DEBUG] Fetched data with version {version} for {original_i}: {data}")
except Exception as e:
print(f"[DEBUG] Exception during versioned data fetch for {original_i}: {e}")
traceback.print_exc()
data = self.get(original_i, pass_python_version_control=True)
print(f"[DEBUG] Fetched fallback data for {original_i}: {data}")
else:
data = self.get(original_i, pass_python_version_control=True)
print(f"[DEBUG] Fetched data without version for {original_i}: {data}")
else:
data = self.get(original_i, pass_python_version_control=True)
print(f"[DEBUG] Fetched data for {original_i}: {data}")

if self.tester:
print(f"[DEBUG] Adding to the_all_imports: {i} -> {data}")
Expand All @@ -501,6 +507,7 @@ def process_item(i):
print(f"[DEBUG] Exception while getting data for {original_i}: {e}")
traceback.print_exc()
the_all_imports[i] = self.get(original_i, pass_python_version_control=True)
print(f"[DEBUG] Added fallback data to the_all_imports: {i} -> {the_all_imports[i]}")

with concurrent.futures.ProcessPoolExecutor() as executor:
executor.map(process_item, the_all)
Expand Down

0 comments on commit 7873e16

Please sign in to comment.