My script needs to copy data into a feature class to an SDE geodatabase that might have a lock on it from another application. I shouldn't break the lock (that app has priority over a data update), but I also don't want the script to quit just because it tried at the wrong moment.
How can I set it to keep trying until there is no lock? I'm looking for something like a try/except, but more like try/keep-trying-every-15-seconds.
I considered making a separate function and adding a pause:
try: funcCopyData() except: pause 10 seconds funcCopyData()
but wouldn't this still be limit me to only two attempts?