<?php

return [
    'ai_metadata' => [
        'pending' => 'proofdb:ai:metadata:pending',
        'delayed' => 'proofdb:ai:metadata:delayed',
        'failed' => 'proofdb:ai:metadata:failed',
        'retry_prefix' => 'proofdb:ai:metadata:retry:',
        'error_prefix' => 'proofdb:ai:metadata:error:',
        'max_retries' => (int) (getenv('AI_METADATA_QUEUE_MAX_RETRIES') ?: 5),
        'base_delay_seconds' => (int) (getenv('AI_METADATA_QUEUE_BASE_DELAY_SECONDS') ?: 60),
        'block_timeout' => (int) (getenv('AI_METADATA_QUEUE_BLOCK_TIMEOUT') ?: 5),
        'idle_sleep_seconds' => (int) (getenv('AI_METADATA_QUEUE_IDLE_SLEEP_SECONDS') ?: 1),
        'dispatcher_interval_seconds' => (int) (getenv('AI_METADATA_QUEUE_DISPATCHER_INTERVAL_SECONDS') ?: 60),
        'dispatcher_batch_size' => (int) (getenv('AI_METADATA_QUEUE_DISPATCHER_BATCH_SIZE') ?: 20),
        'stale_after_seconds' => (int) (getenv('AI_METADATA_QUEUE_STALE_AFTER_SECONDS') ?: 900),
    ],
    'tasks' => [
        'pending' => 'proofdb:tasks:pending',
        'delayed' => 'proofdb:tasks:delayed',
        'failed' => 'proofdb:tasks:failed',
        'retry_prefix' => 'proofdb:tasks:retry:',
        'error_prefix' => 'proofdb:tasks:error:',
        'max_retries' => (int) (getenv('PROOFDB_TASK_QUEUE_MAX_RETRIES') ?: 5),
        'base_delay_seconds' => (int) (getenv('PROOFDB_TASK_QUEUE_BASE_DELAY_SECONDS') ?: 60),
        'block_timeout' => (int) (getenv('PROOFDB_TASK_QUEUE_BLOCK_TIMEOUT') ?: 5),
        'idle_sleep_seconds' => (int) (getenv('PROOFDB_TASK_QUEUE_IDLE_SLEEP_SECONDS') ?: 1),
        'dispatcher_interval_seconds' => (int) (getenv('PROOFDB_TASK_DISPATCHER_INTERVAL_SECONDS') ?: 15),
        'dispatcher_batch_size' => (int) (getenv('PROOFDB_TASK_DISPATCHER_BATCH_SIZE') ?: 20),
        'stale_after_seconds' => (int) (getenv('PROOFDB_TASK_STALE_AFTER_SECONDS') ?: 900),
    ],
];
