diracx-db 0.0.1a35__py3-none-any.whl → 0.0.1a37__py3-none-any.whl

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.
@@ -4,6 +4,7 @@ from enum import Enum, auto
4
4
 
5
5
  from sqlalchemy import (
6
6
  JSON,
7
+ Index,
7
8
  String,
8
9
  Uuid,
9
10
  )
@@ -91,9 +92,11 @@ class RefreshTokens(Base):
91
92
  status = EnumColumn(
92
93
  "Status", RefreshTokenStatus, server_default=RefreshTokenStatus.CREATED.name
93
94
  )
94
- creation_time = DateNowColumn("CreationTime")
95
+ creation_time = DateNowColumn("CreationTime", index=True)
95
96
  scope = Column("Scope", String(1024))
96
97
 
97
98
  # User attributes bound to the refresh token
98
- sub = Column("Sub", String(1024))
99
+ sub = Column("Sub", String(256), index=True)
99
100
  preferred_username = Column("PreferredUsername", String(255))
101
+
102
+ __table_args__ = (Index("index_status_sub", status, sub),)
@@ -30,10 +30,11 @@ class SandboxMetadataDB(BaseSQLDB):
30
30
  )
31
31
  return (await self.conn.execute(stmt)).scalar_one_or_none()
32
32
 
33
- async def get_sandbox_owner_id(self, pfn: str) -> int | None:
33
+ async def get_sandbox_owner_id(self, pfn: str, se_name: str) -> int | None:
34
34
  """Get the id of the owner of a sandbox."""
35
35
  stmt = select(SBOwners.OwnerID).where(
36
36
  SBOwners.OwnerID == SandBoxes.OwnerId,
37
+ SandBoxes.SEName == se_name,
37
38
  SandBoxes.SEPFN == pfn,
38
39
  )
39
40
  return (await self.conn.execute(stmt)).scalar_one_or_none()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: diracx-db
3
- Version: 0.0.1a35
3
+ Version: 0.0.1a37
4
4
  Summary: TODO
5
5
  License: GPL-3.0-only
6
6
  Classifier: Intended Audience :: Science/Research
@@ -8,7 +8,7 @@ diracx/db/os/utils.py,sha256=V4T-taos64SFNcorfIr7mq5l5y88K6TzyCj1YqWk8VI,11562
8
8
  diracx/db/sql/__init__.py,sha256=JYu0b0IVhoXy3lX2m2r2dmAjsRS7IbECBUMEDvX0Te4,391
9
9
  diracx/db/sql/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  diracx/db/sql/auth/db.py,sha256=O9sp-AKobQ4X4IF2WaJKig-8LU8Ra9Syn5jW8JNLRU4,9030
11
- diracx/db/sql/auth/schema.py,sha256=-yXVfNz45W3VvvrNf-ZrSzIgb9qMaI9x1fWDshSkpPU,3141
11
+ diracx/db/sql/auth/schema.py,sha256=9wcciEsXO7lzviYI1npxIYPqLewcSLwGmZwj6jY23GY,3239
12
12
  diracx/db/sql/dummy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  diracx/db/sql/dummy/db.py,sha256=whcF02IjFQTwe1l4iTHtCkg2XukEaLHpLeHYNGMuGGw,1645
14
14
  diracx/db/sql/dummy/schema.py,sha256=9zI53pKlzc6qBezsyjkatOQrNZdGCjwgjQ8Iz_pyAXs,789
@@ -22,7 +22,7 @@ diracx/db/sql/pilot_agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
22
22
  diracx/db/sql/pilot_agents/db.py,sha256=7-cuCbh_KhM0jlybsHMWV-W66bHsPHIVBpbuqwjncj0,1232
23
23
  diracx/db/sql/pilot_agents/schema.py,sha256=KeWnFSpYOTrT3-_rOCFjbjNnPNXKnUZiJVsu4vv5U2U,2149
24
24
  diracx/db/sql/sandbox_metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
- diracx/db/sql/sandbox_metadata/db.py,sha256=hezZ8KCNFybRF4NgdU-fevg1E84vIk9n6FGFopHvbbc,6997
25
+ diracx/db/sql/sandbox_metadata/db.py,sha256=1Nd0gNbPu2F21DYGQkFCLhTeKgUA26GE_vxDcdzUzwQ,7052
26
26
  diracx/db/sql/sandbox_metadata/schema.py,sha256=mI-YpH6NneOQ6QiqwIwyJ4afwfoamybSlQpvaISFfPY,1431
27
27
  diracx/db/sql/task_queue/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  diracx/db/sql/task_queue/db.py,sha256=Ymd9cBasiSAPmgu5846B8KmguRiJ_GoJhuOev9YwW2o,6248
@@ -31,8 +31,8 @@ diracx/db/sql/utils/__init__.py,sha256=QkvpqBuIAgkAOywAssYzdxSzUQVZlSUumK7mPxotX
31
31
  diracx/db/sql/utils/base.py,sha256=7UxHBNLOSjdrIdslMKW4C_c5H9-6Y1BEimxscri2poE,12367
32
32
  diracx/db/sql/utils/functions.py,sha256=iLqlUIQ6SrDUtDEnZ5szaFbdcINJW15KNbCdGXss6kc,3055
33
33
  diracx/db/sql/utils/types.py,sha256=yU-tXsu6hFGPsr9ba1n3ZjGPnHQI_06lbpkTeDCWJtg,1287
34
- diracx_db-0.0.1a35.dist-info/METADATA,sha256=9KlPHZrT1qCFKxJMs6uagTjk8VHZBbKRls7sw2dHqog,644
35
- diracx_db-0.0.1a35.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
36
- diracx_db-0.0.1a35.dist-info/entry_points.txt,sha256=UPqhLvb9gui0kOyWeI_edtefcrHToZmQt1p76vIwujo,317
37
- diracx_db-0.0.1a35.dist-info/top_level.txt,sha256=vJx10tdRlBX3rF2Psgk5jlwVGZNcL3m_7iQWwgPXt-U,7
38
- diracx_db-0.0.1a35.dist-info/RECORD,,
34
+ diracx_db-0.0.1a37.dist-info/METADATA,sha256=3IGaAF5s9Fphlu982N62qlOntl5Xio4wnW_007mSJU8,644
35
+ diracx_db-0.0.1a37.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
36
+ diracx_db-0.0.1a37.dist-info/entry_points.txt,sha256=UPqhLvb9gui0kOyWeI_edtefcrHToZmQt1p76vIwujo,317
37
+ diracx_db-0.0.1a37.dist-info/top_level.txt,sha256=vJx10tdRlBX3rF2Psgk5jlwVGZNcL3m_7iQWwgPXt-U,7
38
+ diracx_db-0.0.1a37.dist-info/RECORD,,