Just as a suggestion, I find long if statements difficult to read. Would it be possible to give these two values relevant names, something like:
min_delta = datetime.timedelta(seconds=-FLAGS.service_down_time) max_delta = datetime.timedelta(seconds=FLAGS.service_down_time)
...which would turn the if into something like:
if min_delta < delta < max_delta:
« Back to merge proposal
Just as a suggestion, I find long if statements difficult to read. Would it be possible to give these two values relevant names, something like:
min_delta = datetime. timedelta( seconds= -FLAGS. service_ down_time) timedelta( seconds= FLAGS.service_ down_time)
max_delta = datetime.
...which would turn the if into something like:
if min_delta < delta < max_delta: