Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
baskiton committed Aug 16, 2023
1 parent daed28d commit 24d1fef
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion example/send/my_exec.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import atexit
import datetime as dt
import dateutil.tz
import errno
import json
import logging
import logging.handlers
Expand Down Expand Up @@ -105,7 +106,14 @@ def run(self):
break

except OSError as e:
self.log.error('send: %s', e)
if e.errno != errno.ENOENT:
t = time.monotonic()
if t > self.err_t_conn:
self.err_t_conn = t + self.err_dt_conn
self.err_dt_conn *= 2
self.log.warning('send: %s', e)
break
self.log.warning('send: %s', e)
flush = 1

except:
Expand Down

0 comments on commit 24d1fef

Please sign in to comment.