mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 00:03:16 +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
|
@ -31,6 +31,9 @@ class CommentPipeline implements ShouldQueue
|
||||||
*/
|
*/
|
||||||
public $deleteWhenMissingModels = true;
|
public $deleteWhenMissingModels = true;
|
||||||
|
|
||||||
|
public $timeout = 5;
|
||||||
|
public $tries = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*
|
*
|
||||||
|
|
|
@ -28,6 +28,9 @@ class LikePipeline implements ShouldQueue
|
||||||
*/
|
*/
|
||||||
public $deleteWhenMissingModels = true;
|
public $deleteWhenMissingModels = true;
|
||||||
|
|
||||||
|
public $timeout = 5;
|
||||||
|
public $tries = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*
|
*
|
||||||
|
|
|
@ -24,6 +24,9 @@ class NewStatusPipeline implements ShouldQueue
|
||||||
*/
|
*/
|
||||||
public $deleteWhenMissingModels = true;
|
public $deleteWhenMissingModels = true;
|
||||||
|
|
||||||
|
public $timeout = 5;
|
||||||
|
public $tries = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*
|
*
|
||||||
|
|
|
@ -8,6 +8,7 @@ use App\Mention;
|
||||||
use App\Profile;
|
use App\Profile;
|
||||||
use App\Status;
|
use App\Status;
|
||||||
use App\StatusHashtag;
|
use App\StatusHashtag;
|
||||||
|
use App\Services\PublicTimelineService;
|
||||||
use App\Util\Lexer\Autolink;
|
use App\Util\Lexer\Autolink;
|
||||||
use App\Util\Lexer\Extractor;
|
use App\Util\Lexer\Extractor;
|
||||||
use DB;
|
use DB;
|
||||||
|
@ -136,7 +137,13 @@ class StatusEntityLexer implements ShouldQueue
|
||||||
|
|
||||||
public function deliver()
|
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);
|
StatusActivityPubDeliver::dispatch($this->status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue