Feature #89
NH- Extend multiple instances to LOAD and SAVE
| Status: | Closed | Start date: | 03/05/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Thierry Rakotoarivelo | % Done: | 100% |
|
| Category: | OMF Software | |||
| Target version: | OMF 5.1 |
Description
Component: NH
Problem: NH currently has the ability to be ran in multiple instances ("--web-port" option of the command 'omf exec'). We need to extend that feature to 'omf save' and 'omf load'.
History
Updated by Thierry Rakotoarivelo almost 3 years ago
- Status changed from New to Resolved
- Assignee set to Thierry Rakotoarivelo
- % Done changed from 0 to 100
Fixed the issue. (SVN rev: 130)
Updated 'nodeHandler.rb' with:
def startWebServer(port = @webPort)
accLog = Logger.new("w_access")
accLog.instance_eval {
def << (msg)
MObject.debug('web::access', msg.strip)
end
}
begin
OMF::ExperimentController::Web::start(port, {:Logger => Logger.new("w_internal"),
:DocumentRoot => NodeHandler.WEB_ROOT(),
:AccessLog => [[accLog, "%h \"%r\" %s %b"]]})
rescue Exception => except
warn("Received '#{except}' when starting NH webserver (port: '#{port}')")
warn("There may be another NH already running on the same tesbed...")
newPort = port + 1;
if (newPort >= (@webPort + MAXWEBTRY))
error("Already tried '#{MAXWEBTRY}' times to start NH webserver. Giving up!")
exit
else
warn("Trying again with another port (port: '#{newPort}')...")
return startWebServer(newPort)
end
end
endUpdated by Christoph Dwertmann almost 3 years ago
- Status changed from Resolved to Closed