Changeset 731 for trunk/gui/scripts
- Timestamp:
- May 12, 2007 3:33:40 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/tool.tcl
r726 r731 44 44 public proc setHubURL {name} { set _resources(-huburl) $name } 45 45 public proc setSession {name} { set _resources(-session) $name } 46 public proc setJobPrt {name} { set _resources(-jobprotocol) $name } 46 47 } 47 48 … … 53 54 hub_name Rappture::Tool::setHubName \ 54 55 hub_url Rappture::Tool::setHubURL \ 55 session_token Rappture::Tool::setSession 56 session_token Rappture::Tool::setSession \ 57 job_protocol Rappture::Tool::setJobPrt 56 58 } 57 59 … … 82 84 return [array get _resources] 83 85 } 84 if { ![info exists _resources($option)]} {85 error "bad option \"$option\": should be [join [array names _resources] {, }]"86 } 87 return $_resources($option)86 if {[info exists _resources($option)]} { 87 return $_resources($option) 88 } 89 return "" 88 90 } 89 91 … … 170 172 set cmd [string trimleft $cmd " "] 171 173 174 # if job_protocol is "submit", then use use submit command 175 if {[resources -jobprotocol] == "submit"} { 176 set cmd [linsert $cmd 0 submit --local] 177 } 178 172 179 # starting job... 173 180 Rappture::rusage mark … … 177 184 set job(output) [string range $cmd 5 end] 178 185 } else { 179 set status [catch {eval blt::bgexec \180 ::Rappture::Tool::job(control) \181 -keepnewline yes \182 -killsignal SIGTERM \183 -onoutput [list [itcl::code $this _output]] \184 -output ::Rappture::Tool::job(output) \185 -error ::Rappture::Tool::job(error) $cmd} result]186 set status [catch {eval blt::bgexec \ 187 ::Rappture::Tool::job(control) \ 188 -keepnewline yes \ 189 -killsignal SIGTERM \ 190 -onoutput [list [itcl::code $this _output]] \ 191 -output ::Rappture::Tool::job(output) \ 192 -error ::Rappture::Tool::job(error) $cmd} result] 186 193 } 187 194 # ...job is finished
Note: See TracChangeset
for help on using the changeset viewer.