Two methods for loading jobs
There are three things wrong with the while loop.


You are looping over a fixed number of times. The only other way to leave the loop is a return statement. This is exactly what a for loop is for. A while loop is used when the number of times the loop needs to execute is not known ahead of time. You should use the right tool for the job.
Don't use the truth value of a value when you can very easily explicitly state what you want the break condition to be. There are two advantages to using i &gt; 0 is better than what you have. First, it is much easier for the reader. What you have forces the reader to think about what i is, how it might be equivalent to False, and how the loop has to manipulate i to reach that condition. Secondly, you can accidentally cause an infinite loop if you are not properly manipulating i. If you accidentally double decrement i when it is equal to 1, then while clause will evaluate to True when it checks -1. This will not happen when you are explicit about when you want the looping to continue.
In the first example, the last line of the loop is continue. This serves no purpose. There is no code that would be executed otherwise if the continue was omitted. Since it is the last line, the next thing that would happen would be to evaluate the while clause. That is the same thing a continue will trigger.


Edit:

With respect to the actual question, I think returning is fine. The seconds example is an attempt to follow the single return pattern. However, the first implementation still only has one return statement. The only other way to exit the method is by having an exception raised. The try block is the main body of the method. Everything else is the retry functionality.