From LinkedIn · · 1 min
The worker didn't get the memo
An editor notices that the assistant is about to publish a post with incorrect information and hits Stop. The API records the cancellation request, returns 200 OK, and updates the UI.
By Olha Shevchenko. Builds and reviews production AI systems on Node.js and AWS.
The UI says "Job stopped".
Excellent. Problem solved.
Except the worker didn't get the memo.
Suppose a Node.js backend runs an AI content assistant. It generates posts, prepares them for publication, and publishes through external APIs.
An editor notices that the assistant is about to publish a post with incorrect information and hits Stop.
The API records the cancellation request, returns 200 OK, and updates the UI.
"Job stopped".
Lovely.
Meanwhile, the worker is still waiting for an AI response.
The response arrives. The worker picks it up and moves to the publishing step.
The cancellation flag? Still sitting in the database, having a very peaceful afternoon.
Nobody checked it again.
So the editor thinks the problem is contained while the assistant is busy publishing the very thing they tried to stop.
Nothing crashed. No exceptions. The API handled the cancellation request exactly as designed.
The worker simply had a different understanding of "Stop".
And that's the part I'd want to investigate before trusting that button.
When does the worker check for cancellation? Is there another check before calling the publishing API? Does stopping one job also prevent the remaining queued jobs from starting?
And how does the person who clicked Stop know what actually happened?
Because 200 OK tells us the server handled a request.
It doesn't prove the work stopped.
And the editor can walk away believing nothing else will be published.