Module worker :: Class Worker
[hide private]
[frames] | no frames]

Class Worker

source code


Instance Methods [hide private]
 
__init__(self, runID, workerServices)
Initializes a worker object
source code
 
DBSession(self, domain)
Returns the DB session according to the given domain
source code
 
getMobileCode(self, domain, codePath)
Returns the mobile code as a package to be returned to the client.
source code
 
getMobileCodeMD5(self, domain, codePath)
Returns the mobile code hash to be returned to the client.
source code
string
directory(self)
Returns the current working directory of the application server.
source code
 
workerServices(self)
Return the worker services.
source code
 
getClientRequest(*args, **kwargs)
Returns: A deferred that will fire with a ClientRequest object.
source code
 
initSendMsg(self, reqID)
Informs the server of the request ID of the following client message.
source code
 
resultReady(self, runID, result)
Returns: A deferred that will fire when the result is delivered to server.
source code
 
callFailed(self, runID, failure)
Returns: A deferred that will errback when the failure is delivered to server.
source code
 
run(*args, **kwargs)
Runs the actual task.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, runID, workerServices)
(Constructor)

source code 

Initializes a worker object

Parameters:
  • workerServices - Services available to this worker
Overrides: object.__init__

DBSession(self, domain)

source code 

Returns the DB session according to the given domain

Parameters:
  • domain (Domain) - DB session for Domain

getMobileCode(self, domain, codePath)

source code 

Returns the mobile code as a package to be returned to the client.

Parameters:
  • codePath (string) - Path to be packaged (i.e. 'bas/controllers')
  • domain (Domain)

getMobileCodeMD5(self, domain, codePath)

source code 

Returns the mobile code hash to be returned to the client.

Parameters:
  • codePath (string) - Path to be packaged (i.e. 'bas/controllers')
  • domain (Domain)

directory(self)

source code 

Returns the current working directory of the application server.

Returns: string
Current working directory.

workerServices(self)

source code 

Return the worker services.

Returns:
Worker services for this worker

getClientRequest(*args, **kwargs)

source code 
Returns:
A deferred that will fire with a ClientRequest object.
Decorators:
  • @defer.inlineCallbacks

initSendMsg(self, reqID)

source code 

Informs the server of the request ID of the following client message.

Parameters:
  • reqID (str) - Unique id for the message send session.

resultReady(self, runID, result)

source code 
Parameters:
  • runID (str) - Unique id for the message send session.
Returns:
A deferred that will fire when the result is delivered to server.

callFailed(self, runID, failure)

source code 
Returns:
A deferred that will errback when the failure is delivered to server.

run(*args, **kwargs)

source code 

Runs the actual task.

Decorators:
  • @defer.inlineCallbacks