camelCase -> snake_case

This commit is contained in:
Landon Abney 2018-06-18 11:54:17 -07:00
parent 31ddd97a34
commit 99b36aab88
No known key found for this signature in database
GPG Key ID: 4414384AEEE3FB2B

View File

@ -242,17 +242,17 @@ def terminate_long_pause(session_id, message, limit, interval, notify=None):
stream.
"""
start = datetime.now()
fudgeFactor = 100 # Keep checking this long after the defined limit
pausedTime = 0
checkLimit = limit + interval + fudgeFactor
fudge_factor = 100 # Keep checking this long after the defined limit
paused_time = 0
check_limit = limit + interval + fudge_factor
while pausedTime < checkLimit:
while paused_time < check_limit:
sessions = get_activity()
foundSession = False
found_session = False
for session in sessions:
if session['session_id'] == session_id:
foundSession = True
found_session = True
state = session['state']
if state == 'paused':
@ -269,7 +269,7 @@ def terminate_long_pause(session_id, message, limit, interval, notify=None):
"Session '{}' has resumed, ".format(session_id) +
"stopping monitoring.")
sys.exit(0)
if not foundSession:
if not found_session:
sys.stdout.write(
"Session '{}' is no longer active ".format(session_id) +
"on the server, stopping monitoring.")