Skip to content

Commit 4f17d9a

Browse files
committed
code review improvements
1 parent f70bc61 commit 4f17d9a

4 files changed

Lines changed: 0 additions & 8 deletions

File tree

src/omniq/_ops.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,6 @@ def child_ack(self, *, key: str, child_id: str) -> int:
504504
except Exception:
505505
return -1
506506

507-
508507
@staticmethod
509508
def paused_backoff_s(poll_interval_s: float) -> float:
510509
return max(0.25, float(poll_interval_s) * 10.0)

src/omniq/exec.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
from .client import OmniqClient
55

6-
76
@dataclass(frozen=True)
87
class Exec:
98
client: OmniqClient

src/omniq/scripts.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@
33
from threading import Lock
44
from typing import Protocol
55

6-
76
class ScriptLoader(Protocol):
87
def script_load(self, script: str) -> str: ...
98

10-
119
@dataclass(frozen=True)
1210
class ScriptDef:
1311
sha: str
1412
src: str
1513

16-
1714
@dataclass(frozen=True)
1815
class OmniqScripts:
1916
enqueue: ScriptDef
@@ -32,15 +29,13 @@ class OmniqScripts:
3229
childs_init: ScriptDef
3330
child_ack: ScriptDef
3431

35-
3632
def default_scripts_dir() -> str:
3733
here = os.path.dirname(__file__)
3834
return os.path.join(here, "core", "scripts")
3935

4036
_scripts_cache: dict[str, OmniqScripts] = {}
4137
_scripts_cache_lock = Lock()
4238

43-
4439
def load_scripts(r: ScriptLoader, scripts_dir: str) -> OmniqScripts:
4540
with _scripts_cache_lock:
4641
cached = _scripts_cache.get(scripts_dir)

src/omniq/transport.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
RedisArg = Union[str, bytes, int, float]
1212

13-
1413
class RedisLike(Protocol):
1514
def evalsha(self, sha: str, numkeys: int, *args: RedisArg) -> Any: ...
1615
def eval(self, script: str, numkeys: int, *args: RedisArg) -> Any: ...

0 commit comments

Comments
 (0)