Skip to main content

queue_storage_schema_ready

Function queue_storage_schema_ready 

Source
pub async fn queue_storage_schema_ready(
    pool: &PgPool,
    schema: &str,
) -> Result<bool, AwaError>
Expand description

Returns true only when every queue-storage substrate object the runtime depends on is present. Workers and producers should treat false as “schema not installed yet” and either wait or trigger QueueStorage::prepare_schema.

The required objects (tables, the job-id sequence, the claim function and its exact signature) originate from the v023 SQL helper, called either by awa migrate for the default schema or by QueueStorage::prepare_schema for custom schemas. If you change a required substrate object or the claim_ready_runtime signature there, update this check at the same time.