chrisan's avatar

Best way to repeatedly dev/test jobs?

I have a job that a user must fill out a form and upload a file with. Based on the form settings the file can be processed in different ways.

Currently I am doing

  1. fill out form and upload pdf
  2. php artisan queue:work --once (the job has a throw at the end to send it to failed jobs)
  3. php artisan queue:failed
  4. php artisan queue:retry #ID (or just knowing to increment the ID and skip 3 for subsequent retries)
  5. go back to 2 until I've done iterating on the job

Is there a better way to go about doing this?

0 likes
3 replies
Tray2's avatar

Unless you are doing something other than moving the pdf I don't see any real reason to use a queue for it.

chrisan's avatar

I said I am processing it in different ways, so yes it is more than moving the pdf

Would it be better to make a new console command and then just have the job call the command?

chrisan's avatar

Well nm, I should have just exited instead of throw

  1. fill out form and upload pdf
  2. php artisan queue:work --once (exit before the end)
  3. run above as many times as needed

Please or to participate in this conversation.