zenwalk / linkage-mapper

Automatically exported from code.google.com/p/linkage-mapper
0 stars 0 forks source link

Consider replacing hiccup code with re-do of entire iteration #69

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Most hiccup code is in loops.  Instead of re-trying the one call, would require 
less code to simply repeat the whole iteration again (i.e., x = x -1 while 
looping on x.)

Original issue reported on code.google.com by mc...@circuitscape.org on 7 Nov 2011 at 1:59

GoogleCodeExporter commented 9 years ago
Code could look like this:

for x in range(0,10):
    successful = False
    while not successful:
        do stuff....

        try something hard
        if (something goes wrong):
            print the error message
            sleep 10 secs
            count the number of times you've repeated
            continue
        do stuff....

        successful = True

Original comment by mc...@circuitscape.org on 7 Nov 2011 at 5:53

GoogleCodeExporter commented 9 years ago
New code in s3 and s5 restarts iteration up to 10 times for most 'hiccup' 
errors.  Those outside of loops still use hiccup code.

Original comment by mc...@circuitscape.org on 5 Dec 2011 at 3:46