I'm using Jobs in Laravel, which implements queues with redis.
By submitting a form I call the function:
private function allUsersNotifications($title, $description) {
$users = $this->userRepo->search();
dispatch(new NotificationsAllUsers($users, $title, $description));
}
and inside the Job (NotificationsAllUsers) I do:
class NotificationsAllUsers implements ShouldQueue {
use InteractsWithQueue,
Queueable,
SerializesModels;
public $users;
public $title;
public $description;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct($users, $title, $description) {
$this->users = $users;
$this->title = $title;
$this->description = $description;
Log::info(3);
}
/**
* Execute the job.
*
* @return void
*/
public function handle() {
Log::info(4);
}
}
When running the job, the log prints me well, but if within the handle method deletion Log :: info (4) and I want to print something else, like Log :: info (1), I still print the 4. Already it's the second time it happens to me that I modify something in the handle of a job and as it does not take the change, as it is in cache.
I have removed the redis and queues cache and it remains the same.