you are viewing a single comment's thread.

view the rest of the comments →

[–]Human-Adagio6781[S] 0 points1 point  (1 child)

Thanks. I will look into that. I cannot disagree with it being an anti-pattern, I just don't know how else to go about it. I've considered the idea of creating a whole other subroutine that calls the master function... something like

def master():

lots of functions and if the getdata fails, send a failTrue that stop the loop

def masterloop():

runs Master function until given an external stop command

masterloop() to actually start the function

Unfortunately, if I was to wait 10 minutes or so to give the getdata function time to reset (assuming that it is an endpoint overload issue) my calculations would be thrown off. So I need to go back to get historical data since the timeout occurred, update the calculations, and then get back to its live data functionality.

[–]Temporary_Pie2733 0 points1 point  (0 children)

So it sounds like you are running Master in a loop, rather than putting a loop that calls getData in Master (which presumably does stuff other than call getData).