Package sage :: Package dsage :: Package database :: Module workerdb :: Class WorkerDatabase
[hide private]
[frames] | no frames]

Class WorkerDatabase

source code

object --+
         |
        WorkerDatabase


This table keeps track of workers.



Instance Methods [hide private]
 
__init__(self, db_conn, log_file='/home/mike/.sage/dsage/server.log', log_level=0)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_set_parameter(self, uuid, key, value) source code
 
set_authenticated(self, uuid, authenticated) source code
 
add_worker(self, host_info) source code
 
update_worker(self, host_info) source code
 
get_worker(self, uuid) source code
 
get_worker_list(self)
Returns a list of connected monitors.
source code
 
set_connected(self, uuid, connected=True)
Sets the connected status of a monitor.
source code
 
is_connected(self, uuid)
Returns whether the monitor is connected.
source code
 
set_busy(self, uuid, busy)
Sets whether or not a worker is doing a job.
source code
 
get_worker_count(self, connected, busy=False)
Returns the number of workers.
source code
 
get_cpu_speed(self, connected=True, busy=False)
Returns the aggregate cpu speed in Mhz.
source code
 
get_cpu_count(self, connected=True)
Returns the number of cpus that are available.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, db_conn, log_file='/home/mike/.sage/dsage/server.log', log_level=0)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

set_connected(self, uuid, connected=True)

source code 

Sets the connected status of a monitor.

Parameters:
uuid -- string
connected -- bool

get_worker_count(self, connected, busy=False)

source code 

Returns the number of workers.

Parameters:
connected -- bool
busy -- bool

get_cpu_speed(self, connected=True, busy=False)

source code 

Returns the aggregate cpu speed in Mhz.

Parameters:
connected -- bool

get_cpu_count(self, connected=True)

source code 

Returns the number of cpus that are available.

Parameters:
connected -- bool