rq icon indicating copy to clipboard operation
rq copied to clipboard

SimpleWorker does not use new version of code

Open louisabraham opened this issue 4 years ago • 2 comments
trafficstars

After changing the code of a function, SimplerWorker still uses the previous code. I understand it's not a bug but it should be documented.

louisabraham avatar Mar 17 '21 16:03 louisabraham

I have actually not tested this myself. Are you implying that RQ's default worker would use the new version of the code whenever there's code changes, but not SimpleWorker?

selwin avatar Apr 20 '21 00:04 selwin

Yes. It's because the default worker spawns a new process and imports all modules again whereas SimpleWorker is typically used to avoid reimporting every time.

louisabraham avatar Apr 20 '21 06:04 louisabraham