Hi there,
Long time user here, I recently deployed an always on task running a simple stock trading script which downloads new data every 5 minutes from an API, checks to see if certain conditions are met for a buy/sell order, executes any orders via the API before saving some data to an SQL database attached to my pythonanywhere account.
I have noticed that each 5 minute block seems to consume around 150 CPU seconds when not running in the tarpit, but when I am inevitably put in the tarpit, that rate seems to drop to around 20 CPU seconds, despite all the same tasks being completed.
I am wondering what explains the difference in CPU second consumption rates and if there is anything I can do to make my code run at the lower rate to avoid entering the tarpit.
Appreciate any insights you are able to provide. Thanks, Matt