Closed sathanas31 closed 1 year ago
Submitter.analyse()
is actually not supposed to return anything, see this. If you want to save the Job IDs you can use submitter.job_id
which is set here during the call to Submitter.analyze
if you use the cluster.
So you could do
job_ids.append(submitter.job_id)
if you wanted.
I would say that your working alternative is already a better solution to the problem. Is there anything wrong with that alternative?
Nothing wrong with the alternative, I was just wondering how could I use the wait_for_cluster()
method instead. I opened it as an issue, but it's more of a question Thx for the tip :)
BTW, you can use Submitter.wait_for_cluster
without any arguments. In that case, it will just wait for all jobs that you have running.
Describe the bug I'm calling the
analyse()
method in a loop and pass it as a jobid variable that is appended into a list, which in turn is fed towait_for_cluster()
method outside the loop. The jobid var is None, although is passed correclty intoself.job_id
in thesubmit_cluster
module, which leads to thewait_for_job()
log message "No Job ID!".The alternative is that
analyse()
isn't passed into a variable when called inside the loop, and instead append the submitter objects into a list. Then looping over the submitters list and callwait_for_job()
works just fine.I'm aware that
analyse()
doesn't return the jobid but just submits the jobs, so it's more of a question how can you use thewait_for_cluster()
correctly if jobids cannot be retrieved from analyse?To Reproduce Code snippet:
Expected behavior job_id != None
Additional context The working alternative is: