Skip to content

JobRegistry

JobRegistry

JobRegistry(path=None)

Persist local job records in SQLite, without saving credentials.

Parameters:

Name Type Description Default
path str | Path | None

Database path. Defaults to FEMORA_JOBS_DB or the platform-specific Femora user-data directory's jobs.sqlite3.

None
Note

Local records are not authoritative remote status. Hiding a record does not cancel a job or delete remote files. Separate processes can share this registry without replacing the entire cache.

Methods:

Name Description
save

Insert or update a record unless its key is hidden.

hide

Remove a cached job and keep remote discovery from restoring it.

is_hidden

Check the local discovery suppression list.

list

List cached records without remote login or refresh.

get

Resolve one cached record by provider UUID or full local key.

Methods:

save

save(record)

Insert or update a record unless its key is hidden.

Parameters:

Name Type Description Default
record JobRecord

Safe job metadata to persist.

required

Returns:

Name Type Description
record JobRecord

Supplied record, even when a hidden key prevents insertion.

hide

hide(key)

Remove a cached job and keep remote discovery from restoring it.

Parameters:

Name Type Description Default
key str

Full registry key, not the provider UUID.

required

Returns:

Name Type Description
hidden bool

Whether an existing cached record was removed.

Note

This changes only the local registry; no cancellation or remote deletion occurs.

is_hidden

is_hidden(key)

Check the local discovery suppression list.

Parameters:

Name Type Description Default
key str

Full registry key.

required

Returns:

Name Type Description
hidden bool

Whether the key is locally hidden.

list

list()

List cached records without remote login or refresh.

Returns:

Name Type Description
records list[JobRecord]

Records sorted by submission timestamp, newest first.

get

get(job_id)

Resolve one cached record by provider UUID or full local key.

Parameters:

Name Type Description Default
job_id str

Provider UUID or registry key.

required

Returns:

Name Type Description
record JobRecord

Matching cached job.

Raises:

Type Description
ValueError

No match or multiple matches; use the full key to disambiguate.