Skip to content

Commit

Permalink
Remove without overlapping middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
robdekort committed Jul 4, 2024
1 parent f6cd0ed commit c24300e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
2 changes: 0 additions & 2 deletions config/statamic-peak-seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

return [
'social_image' => [
'tries' => env('SOCIAL_IMAGE_TRIES', 3),
'release_after' => env('SOCIAL_IMAGE_RELEASE_AFTER', 5),
'node_binary' => env('SOCIAL_IMAGE_NODE_BINARY'),
'npm_binary' => env('SOCIAL_IMAGE_NPM_BINARY'),
'queue_name' => env('SOCIAL_IMAGE_QUEUE_NAME', 'default')
Expand Down
13 changes: 0 additions & 13 deletions src/Jobs/GenerateSocialImagesJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class GenerateSocialImagesJob implements ShouldQueue {
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

public $item;
public $tries;

/**
* Create a new job instance.
Expand All @@ -27,20 +26,8 @@ class GenerateSocialImagesJob implements ShouldQueue {
*/
public function __construct($item) {
$this->item = $item;
$this->tries = config('statamic-peak-seo.social_image.tries');
}

/**
* Middleware to prevent jobs from overlapping.
*
* @return void
*/
public function middleware(): array {
return [(new WithoutOverlapping('generate-social-images'))->releaseAfter(config('statamic-peak-seo.social_image.release_after'))];
}

// Either remove it, or

/**
* Execute the job.
*
Expand Down

0 comments on commit c24300e

Please sign in to comment.