Skip to main content
7 events
when toggle format what by license comment
Jul 13, 2015 at 8:14 vote accept r3wt
Feb 6, 2015 at 3:03 history edited 200_success CC BY-SA 3.0
Correction by @Brythan: the code in the question tries up to 6 times
Feb 3, 2015 at 9:16 comment added Falco I tried to tackle these problems in my answer, but now it looks a little too bloated...
Feb 3, 2015 at 9:05 comment added 200_success @Falco I know it's not ideal. Rev 1 had a superfluous sleep(1) after exhausting the last try, so I had to restructure the loop.
Feb 3, 2015 at 8:58 comment added Falco overall right, but I still don't like to hide a "big function" (something that connects to a DB or does other important stuff) inside a for-loop condition. If I get an DB-Error, it makes it harder to spot the line with the db-call and harder to debug/set breakpoints in that line. I like to put every statement that does work / has side-effects in its own line - your rev 2 seems a bit too "clever"
Feb 3, 2015 at 5:26 history edited 200_success CC BY-SA 3.0
Eliminated the useless final sleep
Feb 3, 2015 at 5:18 history answered 200_success CC BY-SA 3.0