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

condor.q doesn't work #8

Open
chongguang opened this issue Sep 22, 2015 · 8 comments
Open

condor.q doesn't work #8

chongguang opened this issue Sep 22, 2015 · 8 comments

Comments

@chongguang
Copy link

Hello, I'm using your project for my work. But I ran into a problem when using the condor.q function:

when I use the following code:
htcondor.q().then(function(jobs) {
console.log("jobs :"+jobs.length);
//console.dir(jobs);
});

I always get the output: jobs:0

However when I type the condor_q command in my windows cmd, I got:

-- Submitter: grid-master : 10.0.0.110:49284 : grid-master
ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD
128.0 grid 9/22 15:33 0+00:00:00 I 0 0.0 job.bat

1 jobs; 0 completed, 0 removed, 1 idle, 0 running, 0 held, 0 suspended

I'm wondering if this problem comes from your code? Hope that you can help me, thanks a lot.

@chongguang
Copy link
Author

And in fact, the following code is not working neither for me:

htcondor.q({id: "128.0"}, function(err, job){
console.log(JSON.stringify(job, null, 4));
console.log(job);
if(err){
console.log(err);
} else {
console.log(job);
}
})

@chongguang chongguang changed the title condor.q doesn't condor.q doesn't work Sep 22, 2015
@soichih
Copy link
Owner

soichih commented Sep 24, 2015

@chongguang Thank you for reporting this problem.

For the first issue you've reported, I've found a problem and patched it and released a new version.

However, I am not sure about the second one. Could it be that the job has left the queue by the time you ran the htcondor.q({id: "128.0"})?

Anyway, can you update your htcondor npm package (v 0.0.29) and retry?

@chongguang
Copy link
Author

Hi @soichih I installed the 0.0.29 and retried the code:

htcondor.q().then(function(jobs) {
console.log("jobs :"+jobs.length);
//console.dir(jobs);
});

But it's the same result, I always get jobs :0

@chongguang
Copy link
Author

Hi @soichih , I looked at your patch. It seems to me that you didn't do any modification to the function condor_q. You just modified the condor_remove. Maybe you forgot to push?

@chongguang
Copy link
Author

I also used your sample:

htcondor.q({user:""}).then(function(jobs) {
console.log("jobs :"+jobs.length);
console.dir(jobs);
});

it's always jobs :0

@soichih
Copy link
Owner

soichih commented Sep 25, 2015

The github diff are kind of hard to see, but this update applies to the htcondor_q function

1819a69#diff-168726dbe96b3ce427e7fedce31bb0bcR459

I just tested 0.0.29 again locally and it works for me.

var htcondor = require('htcondor');
htcondor.q().then(function(jobs) {
    console.log(jobs.length);
});
2015-09-25 16:17:23 UTC [hayashis@xd-login:~/test/htcondor]$ condor_q
node

-- Submitter: [email protected] : <129.79.53.198:9615?sock=39654_9486> : xd-login.opensciencegrid.org
 ID      OWNER            SUBMITTED     RUN_TIME ST PRI SIZE CMD
52125.0   hayashis        9/25 16:13   0+00:00:00 H  0   0.0  sleep 60

1 jobs; 0 completed, 0 removed, 0 idle, 0 running, 1 held, 0 suspended
2015-09-25 16:17:27 UTC [hayashis@xd-login:~/test/htcondor]$ node q.js
1

Are you sure there were jobs in the condor q when you tested it?

The sample/q.js had broken sample. I've removed the code block you referenced, but sorry for the confusion. To look for jobs for specific user/jobid, you can do

var htcondor = require('htcondor');
htcondor.q("hayashis").then(function(jobs) {
    console.log(jobs.length);
});

@chongguang
Copy link
Author

Hello,

I checked another time, it's still them same result: condor_jobs :0

whereas in my Windows cmd, I have this:

-- Submitter: grid-master : 10.0.0.110:51340 : grid-master
ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD
149.0 grid 9/29 15:08 0+00:00:20 R 0 0.0 job.bat

1 jobs; 0 completed, 0 removed, 0 idle, 1 running, 0 held, 0 suspended

my code is :
htcondor.q("grid").then(function(condor_jobs) {
console.log("condor_jobs :"+condor_jobs.length);
//console.dir(jobs);
})

My grid system is a set of windows laptops, do you think the problem may come from here? Maybe it doesn't work well on Windows?

@soichih
Copy link
Owner

soichih commented Oct 12, 2015

My grid system is a set of windows laptops, do you think the problem may come from here?

I haven't tested htcondor on windows cluster.. (and I don't know how to go about creating one). If you could submit a patch to fix this, I'd certainly merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants