1

we have many releases per day, each release has its own folder. The folder current points to latest release folder. We are using the job queue feature of Laravel with Redis. Now it happens sometimes that jobs stay longer in the queue then the release exist:

  • release100
  • release101
  • release102
  • current -> release103

Job created with release103.

dispatch(new ProcessPodcast($podcast));

After four new deployments release103 was already cleaned from the server:

  • release104
  • release105
  • release106
  • current -> release107

And when the Job now is ready to be processed I get the error "The file release103/vendor/.../foo.php does not exists".

Is there any nice way to avoid this behavior?

ownking
  • 1,956
  • 1
  • 24
  • 34
  • How did you arrange supervisor for this ? How do you process the jobs ? The error you get is it because of the dependency/library used in the job(that `foo.php`) ? Because when the jobs are pushed into the redis, it is serialized but there is no direct full path usage in there. – Ersoy Jun 29 '20 at 19:37
  • Supervisor conf looks like this: ... `directory=/srv/www/.../htdocs/current` `command=php artisan queue:work database --queue=` `numprocs=1` ... So it takes the folder current which is a symlink. It seems the behavior is the same like if I'm inside the current folder during a new release, then I also need to go out and in again to be in the newest release. But how can I avoid that current is not refreshed before execution? – ownking Jul 14 '20 at 16:33

0 Answers0