Author Topic: Jobtype Customization  (Read 3163 times)

snolfi

  • Jr. Member
  • **
  • Posts: 2
Jobtype Customization
« on: July 19, 2010, 02:44:28 PM »
I have very limited knowledge of python and am wondering if I can modify a few files to accomplish the following.  I looked through the reference docs, but I'm not sure if this is beyond my skill set without first knowing python.  Hopefully, someone can chime in. TIA.

1) I'd like to "lock" submission priority values, so that all jobs are submitted with a default value that can then only be modified via the supe.  If this can be accomplished just by hiding the priority item in the submission gui, even though it really wouldn't be locked if submitted via commandline, I'd be fine with that.

2) More a question than something to achieve, but where are the specific job sumission 'Defaults' saved?  And is there a way to distribute this file/values to multiple client machines, via network location perhaps?


jburk

  • Administrator
  • *****
  • Posts: 493
Re: Jobtype Customization
« Reply #1 on: July 19, 2010, 04:37:07 PM »
Priority:
Hiding the priority field in the UI like you suggested (which should cover almost all your use cases) will help during job creation.

Depending on how aggressive your users are with bumping their jobs' priorities, you may also need to remove the "modify" permission from the default set of user permissions, which is set by the "supervior_default_security" configuration parameter on the supervisor.

You would then need to give a certain set of users the 'admin' privilege so that they can modify other users' jobs, which would enable them to change the priority on anyone's jobs.

Defaults:
The defaults are saved along with your preferences, the location of which differs between operating systems. 

Windows, they're in various locations depending on Windows versions:
Win2008/Vista/Win7, stored in <user>AppData\Roaming\qube
pre Win2008Vista, in <user>\Docs and Settings

OSX: ~/Library/Preferences/qube/qube_guiPreferences.conf

Linux: ~/qube/qube_guiPreferences.conf


You can save out a preferences default setting file with QubeGUI->File->Save Preferences Defaults, which will open a browser and allow you to save a file to a specific location.  You can then load this is via the "Studio Default Prefs" value in the QubeGUI prefs, or with the QUBEGUI_DEFAULTPREFS environment variable setting.

snolfi

  • Jr. Member
  • **
  • Posts: 2
Re: Jobtype Customization
« Reply #2 on: July 19, 2010, 06:51:17 PM »
Is hiding the priority field possible when running the compiled version of Qube on Windows?

It looks like I'd need to edit preDialog which is imported via SimpleSubmit.  I think I know how this is done if I were running the qube.py script, but using the executable I'm not sure how to hide it.

jburk

  • Administrator
  • *****
  • Posts: 493
Re: Jobtype Customization
« Reply #3 on: July 22, 2010, 10:27:34 PM »
No, the priority field is from within the compiled portion of the QubeGUI.

The only things that are accessible to be modified when running the qubeGUI are the app-specific sections of the simpleCmd modules, which are still interpreted python.

You can always d/load and install Python, MySQLdb, wxPython, NumPy, PIL, & py2exe, edit the qube.py, then run "python setup.py" to build another compiled GUI that you can distribute to your users.

See QubeGUI->Help->QubeGUI Developer Guide for more info.

I'd recommend:

ActiveState Python 2.6

NumPy 1.4.1
wxPython 2.8
MySQL-Python 1.2.3
(Can't find or remember the PIL ("Image") module version)

All of these have pre-built binaries, either .msi or .exe installers.  You won't need to build anything yourself.

All these (except ActiveState Python) are available at Sourceforge, or Google will point you in the right direction.