`--watch` with `deno serve --parallel` works inconsistently
// mod.ts
export default {
fetch() {
return new Response("Hello 1\n");
},
} satisfies Deno.ServeDefaultExport;
Start the script with deno serve --parallel --watch mod.ts, and then edit the response text to "Hello 2\n".
If I now do bunch of requests I get a mix of the old and new responses (tested in both Firefox and Curl).
If I use DENO_JOBS=1 it works correctly. And strangely if the value is any higher, for example 2, it will serve more than 2 different responses (if there were enough many edits made to serve).
deno 1.46.3 (stable, release, x86_64-unknown-linux-gnu)
v8 12.9.202.5-rusty
typescript 5.5.2
I was able to reproduce that using chrome, but wasn't able to reproduce it either using edge or Postman. What's the intended flow, updating all workers to have the latest changes?
@HasanAlrimawi yes, all workers should be restarted with new code available.