Skip to content

Commit

Permalink
Added lock control
Browse files Browse the repository at this point in the history
  • Loading branch information
onuratakan committed May 9, 2024
1 parent 2e51dfb commit ff86c17
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions upsonic/remote/on_prem.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,10 @@ def get_python_version(self, key):
the_version.append(int(total.split(".")[2]))
return the_version

def get_lock(self, key):
data = {"scope": key}
lock = self._send_request("POST", "/get_lock_of_scope", data)
return lock

def set(
self,
Expand All @@ -685,6 +689,14 @@ def set(



try:
if seld.get_lock(key):
self._log("This scope is locked now! Someone dumping.")
return False
except:
pass




the_type = type(value).__name__
Expand Down

0 comments on commit ff86c17

Please sign in to comment.