fred-oss 0.11.0__tar.gz → 0.12.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fred_oss-0.11.0/src/main/fred_oss.egg-info → fred_oss-0.12.0}/PKG-INFO +1 -1
- fred_oss-0.12.0/src/main/fred/version +1 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/worker/runner/client.py +2 -8
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/worker/runner/utils.py +25 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0/src/main/fred_oss.egg-info}/PKG-INFO +1 -1
- fred_oss-0.11.0/src/main/fred/version +0 -1
- {fred_oss-0.11.0 → fred_oss-0.12.0}/MANIFEST.in +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/NOTICE.txt +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/README.md +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/requirements.txt +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/setup.cfg +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/setup.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/cli/__init__.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/cli/__main__.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/cli/interface.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/cli/main.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/databricks/__init__.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/databricks/cli_ext.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/databricks/runtime.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/databricks/runtimes/__init__.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/databricks/runtimes/scanner.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/databricks/runtimes/sync.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/databricks/wrappers/__init__.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/databricks/wrappers/dbutils.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/runpod/__init__.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/runpod/cli_ext.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/runpod/helper.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/maturity.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/settings.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/utils/__init__.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/utils/dateops.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/utils/runtime.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/version.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/worker/__init__.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/worker/interface.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/worker/runner/__init__.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/worker/runner/handler.py +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred_oss.egg-info/SOURCES.txt +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred_oss.egg-info/dependency_links.txt +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred_oss.egg-info/entry_points.txt +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred_oss.egg-info/requires.txt +0 -0
- {fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred_oss.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.12.0
|
|
@@ -9,6 +9,7 @@ from fred.settings import (
|
|
|
9
9
|
from fred.worker.runner.utils import (
|
|
10
10
|
get_request_queue_name_from_payload,
|
|
11
11
|
get_response_queue_name_from_payload,
|
|
12
|
+
get_redis_configs_from_payload,
|
|
12
13
|
)
|
|
13
14
|
|
|
14
15
|
from redis import Redis
|
|
@@ -24,14 +25,7 @@ class RunnerClient:
|
|
|
24
25
|
|
|
25
26
|
@classmethod
|
|
26
27
|
def auto(cls, **kwargs) -> "RunnerClient":
|
|
27
|
-
redis_configs =
|
|
28
|
-
"host": kwargs.get("host") or get_environ_variable(name="REDIS_HOST", default="localhost"),
|
|
29
|
-
"port": int(kwargs.get("port") or get_environ_variable(name="REDIS_PORT", default=6379)),
|
|
30
|
-
"password": get_environ_variable(name="REDIS_PASSWORD", default=None),
|
|
31
|
-
"db": int(kwargs.get("db") or get_environ_variable(name="REDIS_DB", default=0)),
|
|
32
|
-
"decode_responses": True,
|
|
33
|
-
**kwargs.pop("redis_configs", {}),
|
|
34
|
-
}
|
|
28
|
+
redis_configs = get_redis_configs_from_payload(payload=kwargs, keep=False)
|
|
35
29
|
redis_instance = Redis(**redis_configs)
|
|
36
30
|
req_queue = get_request_queue_name_from_payload(payload=kwargs, keep=False)
|
|
37
31
|
res_queue = get_response_queue_name_from_payload(payload=kwargs, keep=False) or (
|
|
@@ -47,3 +47,28 @@ def get_response_queue_name_from_payload(
|
|
|
47
47
|
default=None,
|
|
48
48
|
keep=keep,
|
|
49
49
|
)
|
|
50
|
+
|
|
51
|
+
def get_redis_configs_from_payload(
|
|
52
|
+
payload: dict,
|
|
53
|
+
keep: bool = False,
|
|
54
|
+
) -> dict:
|
|
55
|
+
for host_key in ["host", "redis_host"]:
|
|
56
|
+
if (host := payload.get(host_key) if keep else payload.pop(host_key, None)):
|
|
57
|
+
break
|
|
58
|
+
for port_key in ["port", "redis_port"]:
|
|
59
|
+
if (port := payload.get(port_key) if keep else payload.pop(port_key, None)):
|
|
60
|
+
break
|
|
61
|
+
for password_key in ["password", "redis_password"]:
|
|
62
|
+
if (password := payload.get(password_key) if keep else payload.pop(password_key, None)):
|
|
63
|
+
break
|
|
64
|
+
for db_key in ["db", "redis_db"]:
|
|
65
|
+
if (db := payload.get(db_key) if keep else payload.pop(db_key, None)):
|
|
66
|
+
break
|
|
67
|
+
return {
|
|
68
|
+
"host": host or get_environ_variable(name="REDIS_HOST", default="localhost"),
|
|
69
|
+
"port": int(port or get_environ_variable(name="REDIS_PORT", default=6379)),
|
|
70
|
+
"password": password or get_environ_variable(name="REDIS_PASSWORD", default=None),
|
|
71
|
+
"db": int(db or get_environ_variable(name="REDIS_DB", default=0)),
|
|
72
|
+
"decode_responses": True,
|
|
73
|
+
**(payload.get("redis_configs", {}) if keep else payload.pop("redis_configs", {})),
|
|
74
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.11.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/databricks/runtimes/__init__.py
RENAMED
|
File without changes
|
{fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/databricks/runtimes/scanner.py
RENAMED
|
File without changes
|
|
File without changes
|
{fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/databricks/wrappers/__init__.py
RENAMED
|
File without changes
|
{fred_oss-0.11.0 → fred_oss-0.12.0}/src/main/fred/integrations/databricks/wrappers/dbutils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|