feat(cms): sync site assets, revalidate webhook, and document download naming
This commit is contained in:
32
app/Jobs/PushNextjsPublicAssetsJob.php
Normal file
32
app/Jobs/PushNextjsPublicAssetsJob.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
use App\Services\NextjsRepoSyncService;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldBeUnique;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class PushNextjsPublicAssetsJob implements ShouldQueue, ShouldBeUnique
|
||||
{
|
||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||
|
||||
/**
|
||||
* Collapse bursts of uploads into a single push.
|
||||
*/
|
||||
public int $uniqueFor = 60;
|
||||
|
||||
public function uniqueId(): string
|
||||
{
|
||||
return 'nextjs-public-assets-push';
|
||||
}
|
||||
|
||||
public function handle(): void
|
||||
{
|
||||
NextjsRepoSyncService::pushPublicAssets();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user