- This topic has 5 replies, 3 voices, and was last updated 12 years, 8 months ago by
Christian Sjostedt.
-
Posted in: Muster usage
-
14th August 2013 at 12:26 pm #14509I’m trying to figure out how to sort my muster jobs through my submissionscript.
Right now I’m submitting jobs and they end up in the muster pane in the root. but I want to submit a job, check to see if there is a folder with the projectName on it, if not create that folder, and then submit the job and put the newly submitted job inside that folder.
I cant seem to figure out how to query only the folders in muster unless I do a LOT of string management myself. I also havnt figured out how to submit a job in under a folder. Any help with this would be much appreciated.
thanks
14th August 2013 at 1:12 pm #15228This is what I’ve done so far, it gives me all the folders with their corresponding IDs (feels like there should be a better way though)
(This is in python)
dispatcherIP = ‘192.168.0.151’
user = ‘XXX’
musterMRToolPath = ‘C:/PROGRA~1/”Virtual Vertex”/”Muster 7″/Mrtool.exe’
command = musterMRToolPath + ‘ -q j -jobengine “” -s ‘ + dispatcherIP + ‘ -u ‘ +userfolders = {}
import subprocess
proc = subprocess.Popen(command,stdout=subprocess.PIPE, shell=True)
while True:
line = proc.stdout.readline()
if line != ”:
try:
print line.rstrip() + ‘n’
folders[line.rstrip().replace(‘ ‘, ”).split(‘|’)[1]] = line.rstrip().replace(‘ ‘, ”).split(‘|’)[0]
print line.rstrip().replace(‘ ‘, ”).split(‘|’)[0], line.rstrip().replace(‘ ‘, ”).split(‘|’)[1]
except:
pass
else:
break
print foldersMy problem now is the syntax to create a folder through commandline (I’m running Windows 7):
Mrtool.exe -b -s 192.168.0.151 -u XXX -folder – results in: Missing folder name.
Mrtool.exe -b -s 192.168.0.151 -u XXX -folder Name – results in:Invalid flag(7): Name
Mrtool.exe -b -s 192.168.0.151 -u XXX -folder “Name” – results in:Invalid flag(7): Name
Mrtool.exe -b -s 192.168.0.151 -u XXX -folder ‘Name’ – results in:Invalid flag(7): ‘Name’Any thoughts?
25th September 2013 at 9:06 pm #15234Hello,
I came across the same problem, but gave up trying to find the folder names. I decided to create the folder names and write down the ID number associated with it. In my script I just use the ID number for the parent folder. Here is a partial code I use to build the cmdline for submission where I add the parent folder ( in Python ):
cmdline = ‘%s -parent %d’ % (cmdline,1854) #This ID matches an already created folder called Quicktimes
What I then do in Muster is make sure that users cannot delete jobs belonging to others. This way that folder doesn’t “accidentally” disappear.
I agree it would be nice to be able to query Muster to find all the IDs belonging to all the folders, but I have no idea as to how or if Muster tracks folder IDs differently than job submissions.
Andrew
27th September 2013 at 7:36 am #15235Thanks Andrew.
Yes that is what I did too.
I’ve send emails about this thread to Virtual Vertex and will post the respnse here when I get it.
27th September 2013 at 7:51 am #15237Actually with mrtool (upcoming M8 has a complete python API), there’s no way to filter for folders , but you can put into the results column, the job type flag (type into the -jf flag), this will output if the job is a folder or not…
-
You must be logged in to reply to this topic.

