diracx-db 0.0.1a16__py3-none-any.whl → 0.0.1a17__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- diracx/db/sql/jobs/status_utility.py +1 -1
- diracx/db/sql/utils.py +4 -2
- {diracx_db-0.0.1a16.dist-info → diracx_db-0.0.1a17.dist-info}/METADATA +3 -3
- {diracx_db-0.0.1a16.dist-info → diracx_db-0.0.1a17.dist-info}/RECORD +7 -7
- {diracx_db-0.0.1a16.dist-info → diracx_db-0.0.1a17.dist-info}/WHEEL +0 -0
- {diracx_db-0.0.1a16.dist-info → diracx_db-0.0.1a17.dist-info}/entry_points.txt +0 -0
- {diracx_db-0.0.1a16.dist-info → diracx_db-0.0.1a17.dist-info}/top_level.txt +0 -0
@@ -41,7 +41,7 @@ async def set_job_status(
|
|
41
41
|
# transform JobStateUpdate objects into dicts
|
42
42
|
statusDict = {}
|
43
43
|
for key, value in status.items():
|
44
|
-
statusDict[key] = {k: v for k, v in value.
|
44
|
+
statusDict[key] = {k: v for k, v in value.model_dump().items() if v is not None}
|
45
45
|
|
46
46
|
_, res = await job_db.search(
|
47
47
|
parameters=["Status", "StartExecTime", "EndExecTime"],
|
diracx/db/sql/utils.py
CHANGED
@@ -11,7 +11,7 @@ from datetime import datetime, timedelta, timezone
|
|
11
11
|
from functools import partial
|
12
12
|
from typing import TYPE_CHECKING, AsyncIterator, Self, cast
|
13
13
|
|
14
|
-
from pydantic import
|
14
|
+
from pydantic import TypeAdapter
|
15
15
|
from sqlalchemy import Column as RawColumn
|
16
16
|
from sqlalchemy import DateTime, Enum, MetaData, select
|
17
17
|
from sqlalchemy.exc import OperationalError
|
@@ -123,7 +123,9 @@ class BaseSQLDB(metaclass=ABCMeta):
|
|
123
123
|
if db_url == "sqlite+aiosqlite:///:memory:":
|
124
124
|
db_urls[db_name] = db_url
|
125
125
|
else:
|
126
|
-
db_urls[db_name] =
|
126
|
+
db_urls[db_name] = str(
|
127
|
+
TypeAdapter(SqlalchemyDsn).validate_python(db_url)
|
128
|
+
)
|
127
129
|
except Exception:
|
128
130
|
logger.error("Error loading URL for %s", db_name)
|
129
131
|
raise
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: diracx-db
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.1a17
|
4
4
|
Summary: TODO
|
5
5
|
License: GPL-3.0-only
|
6
6
|
Classifier: Intended Audience :: Science/Research
|
@@ -14,8 +14,8 @@ Requires-Dist: dirac
|
|
14
14
|
Requires-Dist: diracx-core
|
15
15
|
Requires-Dist: fastapi
|
16
16
|
Requires-Dist: opensearch-py[async]
|
17
|
-
Requires-Dist: pydantic
|
18
|
-
Requires-Dist: sqlalchemy[aiomysql,aiosqlite]
|
17
|
+
Requires-Dist: pydantic >=2.4
|
18
|
+
Requires-Dist: sqlalchemy[aiomysql,aiosqlite] >=2
|
19
19
|
Provides-Extra: testing
|
20
20
|
Requires-Dist: diracx-testing ; extra == 'testing'
|
21
21
|
|
@@ -6,7 +6,7 @@ diracx/db/os/__init__.py,sha256=IZr6z6SefrRvuC8sTC4RmB3_wwOyEt1GzpDuwSMH8O4,112
|
|
6
6
|
diracx/db/os/job_parameters.py,sha256=Knca19uT2G-5FI7MOFlaOAXeHn4ecPVLIH30TiwhaTw,858
|
7
7
|
diracx/db/os/utils.py,sha256=mau0_2uRi-I3geefmKQRWFKo4JcIkIUADvnwBiQX700,9129
|
8
8
|
diracx/db/sql/__init__.py,sha256=R6tk5lo1EHbt8joGDesesYHcc1swIq9T4AaSixhh7lA,252
|
9
|
-
diracx/db/sql/utils.py,sha256=
|
9
|
+
diracx/db/sql/utils.py,sha256=F55qv4u5JQMV5Cl-CNq4nXRCODlCZWarM8Dnkrx55T8,7930
|
10
10
|
diracx/db/sql/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
11
|
diracx/db/sql/auth/db.py,sha256=mKjy5B8orw0yu6nOwxyzbBqyeE-J9iYq6fKjuELmr9g,10273
|
12
12
|
diracx/db/sql/auth/schema.py,sha256=JCkSa2IRzqMHTpaSc9aB9h33XsFyEM_Ohsenex6xagY,2835
|
@@ -16,12 +16,12 @@ diracx/db/sql/dummy/schema.py,sha256=uEkGDNVZbmJecytkHY1CO-M1MiKxe5w1_h0joJMPC9E
|
|
16
16
|
diracx/db/sql/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
17
|
diracx/db/sql/jobs/db.py,sha256=CyQIPX2g5ancBIBEMLijAyTi5HZxTgeVH0qQZ3p3KcU,30722
|
18
18
|
diracx/db/sql/jobs/schema.py,sha256=YkxIdjTkvLlEZ9IQt86nj80eMvOPbcrfk9aisjmNpqY,9275
|
19
|
-
diracx/db/sql/jobs/status_utility.py,sha256=
|
19
|
+
diracx/db/sql/jobs/status_utility.py,sha256=w3caA9ng4y-Bzp0DOasj_DQ_M6JxAzJoHVmyJbEZ2qE,10534
|
20
20
|
diracx/db/sql/sandbox_metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
21
|
diracx/db/sql/sandbox_metadata/db.py,sha256=0EDFMfOW_O3pEPTShqBCME9z4j-JKpyYM6-BBccr27E,6303
|
22
22
|
diracx/db/sql/sandbox_metadata/schema.py,sha256=rngYYkJxBhjETBHGLD1CTipDGe44mRYR0wdaFoAJwp0,1400
|
23
|
-
diracx_db-0.0.
|
24
|
-
diracx_db-0.0.
|
25
|
-
diracx_db-0.0.
|
26
|
-
diracx_db-0.0.
|
27
|
-
diracx_db-0.0.
|
23
|
+
diracx_db-0.0.1a17.dist-info/METADATA,sha256=NarGcFXcBgKbSaHiyBPBVRj7dJ4xQ7OpJ8k0oIA7cHI,691
|
24
|
+
diracx_db-0.0.1a17.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
25
|
+
diracx_db-0.0.1a17.dist-info/entry_points.txt,sha256=xEFGu_zgmPgQPlUeFtdahQfQIboJ1ugFOK8eMio9gtw,271
|
26
|
+
diracx_db-0.0.1a17.dist-info/top_level.txt,sha256=vJx10tdRlBX3rF2Psgk5jlwVGZNcL3m_7iQWwgPXt-U,7
|
27
|
+
diracx_db-0.0.1a17.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|