cooker: add shutdown/stop methods

(Bitbake rev: fc64eff03fe1f41e59128cb3df0ef2161e24a8cb)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Chris Larson 2010-12-08 15:08:18 -05:00 committed by Richard Purdie
parent 825e5045f4
commit 246bd18613
2 changed files with 8 additions and 2 deletions

View File

@ -124,13 +124,13 @@ class CommandsSync:
"""
Trigger cooker 'shutdown' mode
"""
command.cooker.state = bb.cooker.state.shutdown
command.cooker.shutdown()
def stateStop(self, command, params):
"""
Stop the cooker
"""
command.cooker.state = bb.cooker.state.stop
command.cooker.stop()
def getCmdLineAction(self, command, params):
"""

View File

@ -953,6 +953,12 @@ def server_main(cooker, func, *args):
return ret
def shutdown(self):
self.state = state.shutdown
def stop(self):
self.state = state.stop
class CookerExit(bb.event.Event):
"""
Notify clients of the Cooker shutdown