/usr/lib/python3/dist-packages/landscape/lib/__pycache__
NameSizeModeActions
amp.cpython-310.pyc217830644editdlrm
backoff.cpython-310.pyc21370644editdlrm
base64.cpython-310.pyc3330644editdlrm
bootstrap.cpython-310.pyc22770644editdlrm
bpickle.cpython-310.pyc66580644editdlrm
cli.cpython-310.pyc5810644editdlrm
cloud.cpython-310.pyc18610644editdlrm
compat.cpython-310.pyc6060644editdlrm
config.cpython-310.pyc102180644editdlrm
disk.cpython-310.pyc40800644editdlrm
encoding.cpython-310.pyc7590644editdlrm
fd.cpython-310.pyc9510644editdlrm
fetch.cpython-310.pyc72350644editdlrm
format.cpython-310.pyc8920644editdlrm
fs.cpython-310.pyc35930644editdlrm
gpg.cpython-310.pyc21700644editdlrm
hashlib.cpython-310.pyc4080644editdlrm
jiffies.cpython-310.pyc13520644editdlrm
juju.cpython-310.pyc8070644editdlrm
lock.cpython-310.pyc10650644editdlrm
log.cpython-310.pyc6710644editdlrm
logging.cpython-310.pyc23660644editdlrm
message.cpython-310.pyc21270644editdlrm
monitor.cpython-310.pyc72000644editdlrm
network.cpython-310.pyc90150644editdlrm
os_release.cpython-310.pyc12490644editdlrm
persist.cpython-310.pyc177870644editdlrm
plugin.cpython-310.pyc25650644editdlrm
process.cpython-310.pyc43830644editdlrm
reactor.cpython-310.pyc101080644editdlrm
schema.cpython-310.pyc71550644editdlrm
scriptcontent.cpython-310.pyc6740644editdlrm
sequenceranges.cpython-310.pyc49200644editdlrm
store.cpython-310.pyc12200644editdlrm
sysstats.cpython-310.pyc77650644editdlrm
tag.cpython-310.pyc8790644editdlrm
testing.cpython-310.pyc261940644editdlrm
timestamp.cpython-310.pyc4360644editdlrm
twisted_util.cpython-310.pyc47360644editdlrm
user.cpython-310.pyc9080644editdlrm
versioning.cpython-310.pyc16480644editdlrm
vm_info.cpython-310.pyc28240644editdlrm
warning.cpython-310.pyc6150644editdlrm
__init__.cpython-310.pyc3520644editdlrm
Edit: /usr/lib/python3/dist-packages/landscape/lib/__pycache__/backoff.cpython-310.pyc (2137B)
o c@sddlZGdddZdS)Nc@s:eZdZdZddZddZddZdd Zdd d Zd S)ExponentialBackoffz^ Keeps track of a backoff delay that staggers down and staggers up exponentially. cCsd|_||_||_dS)Nr) _error_count _start_delay _max_delay)self start_delay max_delayr 7/usr/lib/python3/dist-packages/landscape/lib/backoff.py__init__ s zExponentialBackoff.__init__cCs |jd8_t|jd|_dS)z0Decreases error count with zero being the lowestrN)rmaxrr r r decreaseszExponentialBackoff.decreasecCs$||jkr|jd7_dSdS)z=Increases error count but not higher than gives the max delayr N) get_delayrrrr r r increaseszExponentialBackoff.increasecCs0|jrd|jd|j}nd}tt||jS)aR Calculates the delay using formula that gives this chart. In this specific example start is 5 seconds and max is 60 seconds Count Delay 0 0 1 5 2 10 3 20 4 40 5 60 (max) r r)rrminintr)rdelayr r r rs zExponentialBackoff.get_delay?cCs0|}|d|}||t}t||S)z Adds randomness to the specified stagger of the delay. For example for a delay of 12 and 25% stagger, it works out to 9 + rand(0,3) r )rrandomr)rstagger_fractionrnon_random_part random_partr r r get_random_delay-s  z#ExponentialBackoff.get_random_delayN)r) __name__ __module__ __qualname____doc__r rrrrr r r r rsr)rrr r r r s