Forums

What is web workers per app?

I came across the term 'web worker' on pythonanywhere pricing plan. What does this term mean? Is it like if I have 2 web workers per app, it means that two people with different accounts can now have access to my web app backend and modify the app independently? Or is it something else?

Web worker is a process that is available for a web app to handle a request. If you have 2 web workers per web app, it means that two requests can be handled at the same time. If you want to get a little bit more context for that, have a look at this help page.

When I run a subprocess what happens? Does it use the web worker?

A subprocess would be a child process spawned by the worker.

So if I spawn a subprocess would my web worker be unable to handle request? I want to run some scrapy spiders when users post some form and I don't know how PA would handle it.

It depends on how you spawned it; if you used subprocess.Popen then the subprocess would be a child process of the worker, but so long as you didn't wait for it to complete, you'd be able to return from the view function in the worker and it would continue to run in the background. However, if you used a call that did wait for completion, like subprocess.check_output, then your worker process would be locked up until the process completed and would not be handling other requests.