Forums

questions on CPU-seconds

I want to add a function in my web app. when user click such new function, the backend view.py will call and run another python program (new_function.py). this new_function.py noramally needs to run at least 200 - 300 seconds in real time. Since my account only gets 2000 cpu seconds, it will very soon reach the limit. I am wondering if it is true? what's the difference between 2000 cpu seconds and new_function.py execution time (200-300 seconds). If I deploy such function in my web app, appromately how many times can users run it per day? during the runing of this new_funciton.py, does it affect other users to browse the website?

Here you go: https://help.pythonanywhere.com/pages/WhatAreCPUSeconds/

I read through it before. however, by reading this it still does not give me an estimation of how many times the above metioned "new_funciton.py" can run. per day. The program itself needs 200-300 seconds to calculate a result. I am not sure how does it relate to cup-seconds. And the instruction also says "It does not currently apply to your web apps." Does it mean there is no limitation impact?

How many CPU seconds your code uses depends entirely on your code, so we can't put that information in help pages and forum posts.

CPU seconds are not counted in web apps.

CPU seconds are not counted in web apps --- ok, so I dont have to worry about the limitation. When one of the users click the web page to run this heavy program which needs at lease 300 seconds to run, does it affect other users browsing/using the website (in terms of visiting pages/submitting forms/browsing speed, etc..)?

Yes, it affects other users by blocking the web worker.

what do you mean by web worker?

This help page explains what workers are and what they do.