以下改动此前只在生产服务器上直接修改,未进仓库,现按线上文件原样收回: - 处方 AI:新增 prescription-ai:dispatch 每分钟派发单轮队列(PrescriptionAiDispatch、 PrescriptionAiLaneGuard 队列锁),work 命令支持 --scheduled;重试接口返回与轮询一致的 任务状态,额度用尽时提示最早可重试时间;每日模型任务默认额度 200 → 5000 - 定时任务 SQL:database/migrations/2026_12_02_prescription_ai_crontab.sql(线上已执行) - project.php:prescription_library_manage_all_roles / prescription_audit_roles 加入角色 13 Co-Authored-By: Claude Opus 5 <[EMAIL]>
26 lines
1.4 KiB
PHP
Executable File
26 lines
1.4 KiB
PHP
Executable File
<?php
|
|
|
|
/** Async clinician-facing analysis. Enable only after migration and workers are ready. */
|
|
return [
|
|
'enabled' => filter_var(env('prescription_analysis.ENABLED', false), FILTER_VALIDATE_BOOLEAN),
|
|
'encryption_key' => (string) env('prescription_analysis.ENCRYPTION_KEY', ''),
|
|
'start_at' => (int) env('prescription_analysis.START_AT', 0),
|
|
'transcript_wait_seconds' => 300,
|
|
'debounce_seconds' => 60,
|
|
'lease_seconds' => 600,
|
|
'max_attempts' => 3,
|
|
'max_manual_retries' => 2,
|
|
'daily_model_tasks' => (int) env('prescription_analysis.DAILY_MODEL_TASKS', 5000),
|
|
// Analyses of one prescription per day. Regenerating after each change is the normal way to
|
|
// review a case, so this is a budget guard, not a correctness limit.
|
|
'daily_patient_batches' => (int) env('prescription_analysis.DAILY_PATIENT_BATCHES', 20),
|
|
// Tasks that may run at the same time for one model, so several prescriptions are analysed
|
|
// concurrently instead of queueing behind each other. Each running task needs its own consumer
|
|
// process: start this many `php think prescription-ai:work --lane=<model>` instances.
|
|
'max_parallel_per_model' => max(1, (int) env('prescription_analysis.MAX_PARALLEL_PER_MODEL', 4)),
|
|
'refresh_recent_days' => 7,
|
|
'auto_refresh_sources' => true,
|
|
'auto_refresh_prescription' => true,
|
|
'max_context_bytes' => 8000000,
|
|
];
|