mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update jobs, add retry and timeout attributes
This commit is contained in:
parent
0309f8a4e1
commit
6476855519
4 changed files with 17 additions and 1 deletions
|
@ -30,6 +30,9 @@ class CommentPipeline implements ShouldQueue
|
|||
* @var bool
|
||||
*/
|
||||
public $deleteWhenMissingModels = true;
|
||||
|
||||
public $timeout = 5;
|
||||
public $tries = 1;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
|
|
|
@ -28,6 +28,9 @@ class LikePipeline implements ShouldQueue
|
|||
*/
|
||||
public $deleteWhenMissingModels = true;
|
||||
|
||||
public $timeout = 5;
|
||||
public $tries = 1;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
|
|
|
@ -23,6 +23,9 @@ class NewStatusPipeline implements ShouldQueue
|
|||
* @var bool
|
||||
*/
|
||||
public $deleteWhenMissingModels = true;
|
||||
|
||||
public $timeout = 5;
|
||||
public $tries = 1;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
|
|
|
@ -8,6 +8,7 @@ use App\Mention;
|
|||
use App\Profile;
|
||||
use App\Status;
|
||||
use App\StatusHashtag;
|
||||
use App\Services\PublicTimelineService;
|
||||
use App\Util\Lexer\Autolink;
|
||||
use App\Util\Lexer\Extractor;
|
||||
use DB;
|
||||
|
@ -136,7 +137,13 @@ class StatusEntityLexer implements ShouldQueue
|
|||
|
||||
public function deliver()
|
||||
{
|
||||
if(config('federation.activitypub.enabled') == true) {
|
||||
$status = $this->status;
|
||||
|
||||
if($status->uri == null && $status->scope == 'public') {
|
||||
PublicTimelineService::add($status->id);
|
||||
}
|
||||
|
||||
if(config('federation.activitypub.enabled') == true && config('app.env') == 'production') {
|
||||
StatusActivityPubDeliver::dispatch($this->status);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue