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

Method insert

ci/docker_utils/container_db.py:176–215  ·  view source on GitHub ↗

Insert a new container record. Args: container_id: Docker container ID container_name: Container name image_name: Docker image name owner_pid: Process ID of owner config_hash: Hash of container configuration platform_ty

(
        self,
        container_id: str,
        container_name: str,
        image_name: str,
        owner_pid: int,
        config_hash: str = "",
        platform_type: str = "",
    )

Source from the content-addressed store, hash-verified

174 conn.close()
175
176 def insert(
177 self,
178 container_id: str,
179 container_name: str,
180 image_name: str,
181 owner_pid: int,
182 config_hash: str = "",
183 platform_type: str = "",
184 ) -> None:
185 """Insert a new container record.
186
187 Args:
188 container_id: Docker container ID
189 container_name: Container name
190 image_name: Docker image name
191 owner_pid: Process ID of owner
192 config_hash: Hash of container configuration
193 platform_type: Platform family (e.g., "avr", "esp-32s3")
194 """
195 conn = self._get_connection()
196 try:
197 cursor = conn.cursor()
198 cursor.execute(
199 """
200 INSERT INTO containers (container_id, container_name, image_name, owner_pid, created_at, config_hash, platform_type)
201 VALUES (?, ?, ?, ?, ?, ?, ?)
202 """,
203 (
204 container_id,
205 container_name,
206 image_name,
207 owner_pid,
208 int(time.time()),
209 config_hash,
210 platform_type,
211 ),
212 )
213 conn.commit()
214 finally:
215 conn.close()
216
217 def delete_by_id(self, container_id: str) -> None:
218 """Delete container record by ID.

Callers 15

prepare_containerFunction · 0.95
test_record_operationsFunction · 0.95
test_orphan_detectionFunction · 0.95
ensure_meson_configuredFunction · 0.45
_load_emcc_moduleFunction · 0.45
ensure_includeFunction · 0.45
_ensure_includeFunction · 0.45
_ensure_includeFunction · 0.45
_ensure_includeFunction · 0.45
parseMethod · 0.45

Calls 5

_get_connectionMethod · 0.95
executeMethod · 0.80
timeMethod · 0.80
commitMethod · 0.80
closeMethod · 0.45

Tested by 3

test_record_operationsFunction · 0.76
test_orphan_detectionFunction · 0.76
runnerFunction · 0.36