Monitor
The ProjectRecord objects are used to manage the loaded projects. There is one entry for each project in the @projects list.
# File lib/daemon/ProjectBroker.rb, line 521 521: def initialize(tag) 522: # Before we know the project ID we use this tag to uniquely identify the 523: # project. 524: @tag = tag 525: # Array of [ workingDir, tjp file, ... tji files ] 526: @files = nil 527: # The authentication key for the ProjectServer process. 528: @authKey = nil 529: # The DRb URI where the ProjectServer process is listening. 530: @uri = nil 531: # The ID of the project. 532: @id = nil 533: # The state of the project. :new, :loading, :ready, :failed 534: # and :obsolete are supported. 535: @state = :new 536: # A time stamp when the project became ready for service. 537: @readySince = nil 538: # True if any of the input files have been modified after the load. 539: @modified = false 540: # True if the reload has already been triggered. 541: @reloading = false 542: 543: @log = LogFile.instance 544: @projectServer = nil 545: end
# File lib/daemon/ProjectBroker.rb, line 547 547: def ping 548: return true unless @uri 549: 550: @log.debug("Sending ping to ProjectServer #{@uri}") 551: begin 552: @projectServer = DRbObject.new(nil, @uri) unless @projectServer 553: @projectServer.ping(@authKey) 554: rescue 555: @log.error("Ping failed: #{$!}") 556: return false 557: end 558: true 559: end
Call this function to terminate the ProjectServer.
# File lib/daemon/ProjectBroker.rb, line 562 562: def terminateServer 563: return unless @uri 564: 565: begin 566: @log.debug("Sending termination request to ProjectServer #{@uri}") 567: @projectServer = DRbObject.new(nil, @uri) unless @projectServer 568: @projectServer.terminate(@authKey) 569: rescue 570: @log.error("Termination of ProjectServer failed: #{$!}") 571: end 572: @uri = nil 573: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.