|
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright Buildbot Team Members
return self.name return self.admin return self.host return self.access_uri return self.version return self.connected return self._lastMessageReceived return self.runningBuilds then = time.time() - 3600 return len([ t for t in self.connect_times if t > then ])
# record this connnect, and keep data for the last hour
self.runningBuilds.append(build) self.runningBuilds.remove(build)
"""Return the graceful shutdown flag""" """Set the graceful shutdown flag, and notify all the watchers""" eventually(cb, graceful) """Add watcher to the list of watchers to be notified when the graceful shutdown flag is changed.""" """Remove watcher from the list of watchers to be notified when the graceful shutdown flag is changed."""
result = {} # Constant result['name'] = self.getName() result['access_uri'] = self.getAccessURI()
# Transient (since it changes when the slave reconnects) result['host'] = self.getHost() result['admin'] = self.getAdmin() result['version'] = self.getVersion() result['connected'] = self.isConnected() result['runningBuilds'] = [b.asDict() for b in self.getRunningBuilds()] return result
|