Rename get_user_activity

This function was actually getting _just_ the session IDs, not the whole 
session data.
This commit is contained in:
Landon Abney 2018-06-16 21:04:55 -07:00
parent e56d23b12d
commit 00f4bf26a9
No known key found for this signature in database
GPG Key ID: 15320D3C4A506996

View File

@ -120,8 +120,8 @@ def get_activity():
pass pass
def get_user_activity(user_id): def get_user_session_ids(user_id):
"""Get current sessions for a specific user. """Get current session IDs for a specific user.
Parameters Parameters
---------- ----------
@ -131,7 +131,7 @@ def get_user_activity(user_id):
Returns Returns
------- -------
list list
The active sessions for the specific user ID. The active session IDs for the specific user ID.
""" """
sessions = get_activity() sessions = get_activity()
@ -189,7 +189,7 @@ if __name__ == "__main__":
if opts.jbop == 'stream': if opts.jbop == 'stream':
terminate_session(opts.sessionId, message) terminate_session(opts.sessionId, message)
elif opts.jbop == 'allStreams': elif opts.jbop == 'allStreams':
streams = get_user_activity(opts.userId) streams = get_user_session_ids(opts.userId)
for session_id in streams: for session_id in streams:
terminate_session(session_id, message) terminate_session(session_id, message)