Skip to content

Commit

Permalink
determine_user
Browse files Browse the repository at this point in the history
  • Loading branch information
hafsanaeem-2 committed Nov 30, 2022
1 parent 05716de commit 3c60bb9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eessi_bot_job_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def __init__(self):

def get_current_jobs(self):
# who am i
username = os.getlogin()
username = os.getenv('USER', None)
if username is None:
raise Exception("Unable to find username")

squeue_cmd = "%s --long --user=%s" % (self.poll_command, username)
squeue_output, squeue_err, squeue_exitcode = run_cmd(
Expand Down

0 comments on commit 3c60bb9

Please sign in to comment.