Add (initial): futurewalker code

This commit is contained in:
2023-11-20 00:15:18 +08:00
parent f8602cb456
commit 9ce3e5c82a
166 changed files with 15941 additions and 1072 deletions

View File

@@ -14,14 +14,16 @@ class PublishIndexPostJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
protected $post;
protected $post_id;
public $timeout = 10;
/**
* Create a new job instance.
*/
public function __construct(Post $post)
public function __construct(int $post_id)
{
$this->post = $post;
$this->post_id = $post_id;
}
/**
@@ -29,8 +31,6 @@ public function __construct(Post $post)
*/
public function handle(): void
{
if (! is_null($this->post)) {
PublishIndexPostTask::handle($this->post);
}
PublishIndexPostTask::handle($this->post_id);
}
}