MCPcopy Create free account
hub / github.com/FastLED/FastLED / get_by_id

Method get_by_id

ci/docker_utils/container_db.py:145–174  ·  view source on GitHub ↗

Get container record by ID. Args: container_id: Container ID to look up Returns: ContainerRecord if found, None otherwise

(self, container_id: str)

Source from the content-addressed store, hash-verified

143 conn.close()
144
145 def get_by_id(self, container_id: str) -> Optional[ContainerRecord]:
146 """Get container record by ID.
147
148 Args:
149 container_id: Container ID to look up
150
151 Returns:
152 ContainerRecord if found, None otherwise
153 """
154 conn = self._get_connection()
155 try:
156 cursor = conn.cursor()
157 cursor.execute(
158 "SELECT container_id, container_name, image_name, owner_pid, created_at, config_hash, platform_type FROM containers WHERE container_id = ?",
159 (container_id,),
160 )
161 row = cursor.fetchone()
162 if row:
163 return ContainerRecord(
164 container_id=row[0],
165 container_name=row[1],
166 image_name=row[2],
167 owner_pid=row[3],
168 created_at=row[4],
169 config_hash=row[5] if len(row) > 5 else "",
170 platform_type=row[6] if len(row) > 6 else "",
171 )
172 return None
173 finally:
174 conn.close()
175
176 def insert(
177 self,

Callers 1

test_record_operationsFunction · 0.95

Calls 4

_get_connectionMethod · 0.95
ContainerRecordClass · 0.85
executeMethod · 0.80
closeMethod · 0.45

Tested by 1

test_record_operationsFunction · 0.76