mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-16 13:07:46 +02:00
fix(fediverse): add "processing" and "failed" statuses to better manage broadcast load
fixes #511
This commit is contained in:
parent
d30c49cdff
commit
1d7583d738
4 changed files with 71 additions and 20 deletions
|
|
@ -123,11 +123,12 @@ class ActivityModel extends UuidModel
|
|||
/**
|
||||
* @return Activity[]
|
||||
*/
|
||||
public function getScheduledActivities(): array
|
||||
public function getScheduledActivities(int $limit = 10): array
|
||||
{
|
||||
return $this->where('`scheduled_at` <= UTC_TIMESTAMP()', null, false)
|
||||
->where('status', 'queued')
|
||||
->orderBy('scheduled_at', 'ASC')
|
||||
->limit($limit)
|
||||
->findAll();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue