Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
use dispatch_sync (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon authored Mar 23, 2023
1 parent 787cc48 commit 9d6ea8f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Http/Controllers/JobController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class JobController
/**
* Creates a new instance of the job controller.
*
* @param JobsRepository $repository
* @return void
*/
public function __construct(JobsRepository $repository)
Expand All @@ -33,7 +32,6 @@ public function __construct(JobsRepository $repository)
* Gets the job results by the given request filters.
*
* @param string $group
* @param JobRequest $request
* @return SearchResult
*/
public function index($group, JobRequest $request)
Expand All @@ -46,7 +44,6 @@ public function index($group, JobRequest $request)
*
* @param string $group
* @param string $id
* @param JobRequest $request
* @return Job|null
*/
public function show($group, $id, JobRequest $request)
Expand All @@ -62,7 +59,7 @@ public function show($group, $id, JobRequest $request)
*/
public function retry($id)
{
dispatch_now(new RetryFailedJob($id));
dispatch_sync(new RetryFailedJob($id));
}

/**
Expand All @@ -73,6 +70,6 @@ public function retry($id)
*/
public function forget($id)
{
dispatch_now(new ForgetFailedJob($id));
dispatch_sync(new ForgetFailedJob($id));
}
}

0 comments on commit 9d6ea8f

Please sign in to comment.