Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore default get_njobs_in_queue behavior #542

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fireworks/user_objects/queue_adapters/common_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def submit_to_queue(self, script_file):
# random error, e.g. no qsub on machine!
log_exception(queue_logger, f"Running the command: {submit_cmd} caused an error...")

def get_njobs_in_queue(self, username=None):
def get_njobs_in_queue(self, username=None, shell : bool = False):
"""
returns the number of jobs currently in the queue for the user.

Expand All @@ -251,7 +251,7 @@ def get_njobs_in_queue(self, username=None):

# run qstat
qstat = Command(self._get_status_cmd(username))
p = qstat.run(timeout=self.timeout, shell=True)
p = qstat.run(timeout=self.timeout, shell=shell)

# parse the result
if p[0] == 0:
Expand Down