Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Add queue interaction support #21

Merged
merged 25 commits into from
Mar 5, 2014
Merged

Add queue interaction support #21

merged 25 commits into from
Mar 5, 2014

Conversation

josenavas
Copy link
Member

Fixes #20
Fixes #18

Allows the creation of a benchmark suite for a queueing system.
Adds a wait_on functionality on the process-bench-results command, which receives a list of job ids and waits for its completion before processing the results.

@antgonza, @wasade are you available for review?

running
"""
# Get all the commands running pf the current user
user = os.environ['USER']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is against PEP 8 recommendations. You should use environ[...] vs. os.environ[...]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I'm assuming that I've to do the same for the Popen call below, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for everything in your code.

@josenavas
Copy link
Member Author

@antgonza I think I've addressed your comments. Let me know if there is anything left.

lines = stdout.splitlines()
running_jobs = []
for l in lines:
job_id, job_name, user, time, status, queue = l.split()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it be possible to ignore empty lines and those that start with # (comments).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should never happen. Note that lines is the output of qstat | grep user.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong line, meant to add it to were the parsing of the text file to create jobs happens.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The creation of jobs happens in bash, so I don't really know where you meant 😖

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, my bad. Was confused with the way that cluster_jobs.py works.

@antgonza
Copy link
Member

I have all my comments in. @wasade do you have any?

@josenavas
Copy link
Member Author

@wasade Are you going to review this?

@antgonza
Copy link
Member

antgonza commented Mar 5, 2014

After 12 days @wasade didn't reply. Thus, I assume that he has no more comments. I will merge now.

antgonza added a commit that referenced this pull request Mar 5, 2014
Add queue interaction support
@antgonza antgonza merged commit 231eda8 into qiime:master Mar 5, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support interaction with queues Statement is a NOP
2 participants