暂存
This commit is contained in:
@@ -29,6 +29,7 @@ class AiMetadata
|
||||
$this->queue->releaseDueDelayed();
|
||||
$archiveUid = $this->queue->pop($this->queue->blockTimeout());
|
||||
if ($archiveUid === null) {
|
||||
sleep($this->queue->idleSleepSeconds());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,11 @@ class AiMetadataQueue
|
||||
return (int) config('queue.ai_metadata.block_timeout', 5);
|
||||
}
|
||||
|
||||
public function idleSleepSeconds(): int
|
||||
{
|
||||
return max(1, (int) config('queue.ai_metadata.idle_sleep_seconds', 1));
|
||||
}
|
||||
|
||||
private function pendingKey(): string
|
||||
{
|
||||
return config('queue.ai_metadata.pending', 'proofdb:ai:metadata:pending');
|
||||
|
||||
Reference in New Issue
Block a user