What went wrong
The LMS makes study guidesLMS · LMS AI Core · The Laravel sideStudy guidesA saved guide is shown only while it still matches the lesson as it is now. It must also match the current AI provider, model and settings.See it in the LMS build in the background. Each one is a job that waits in a queue, a line of tasks waiting their turn. A worker is a program that takes jobs from the queue and runs them. The permanent study guide worker is the one meant to keep running. It was started with an option that Laravel, the framework the LMS is built on, did not support. So the worker failed before it made anything.
Why retrying didn’t help
Running the job again could not fix it, because the worker never got as far as taking a job. The fault was in the command that starts the worker. That command has two modes. The permanent mode keeps running for later work. The other mode, the backfill drain, works through a backlog of waiting jobs. It can use a supported option to stop once its first queue is empty.
What I changed
The command now uses supported options. Before it starts the worker, it checks the queue names and the number settings. It also keeps the two modes apart.
Failures while a guide is being made are a separate matter, handled inside the job. The job that makes a study guide gets three tries and a time limit of 180 seconds. It also has a rule of one job per lesson that lasts 900 seconds. This limits overlapping work on a lesson for that time. Some AI provider errors are worth trying again. When one of those happens, the job goes back in the queue and waits for the requested delay. If the last try fails, the job saves a prepared reason and message.
How I know it works
Tests give the job a reply in broken A technical wordJSONA common text format that programs use to send each other structured data., a text format that programs use to send data. They also give it a failed extraction step. After a failed extraction, no guide content may be marked ready. And the next job must not be sent. That job would turn the guide’s text into numbers, so the assistant can search it by meaning. The June closing record shows two things passing, with 79 checks in all. These are the study guide tests and a test that stops the worker problem coming back. That last test checks the command, not a running worker.