return an async result from standby.cache_images
This commit is contained in:
parent
d6ddc267b3
commit
d25dee80bb
teeth_agent
@ -102,10 +102,12 @@ class AsyncCommandResult(BaseCommandResult):
|
||||
return super(AsyncCommandResult, self).serialize(view)
|
||||
|
||||
def start(self):
|
||||
return self.execution_thread.start()
|
||||
self.execution_thread.start()
|
||||
return self
|
||||
|
||||
def join(self):
|
||||
return self.execution_thread.join()
|
||||
self.execution_thread.join()
|
||||
return self
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
|
@ -18,6 +18,12 @@ from teeth_agent import base
|
||||
from teeth_agent import errors
|
||||
|
||||
|
||||
class CacheImagesCommand(base.AsyncCommandResult):
|
||||
def execute(self):
|
||||
# TODO(russellhaering): Actually cache images
|
||||
pass
|
||||
|
||||
|
||||
class StandbyAgent(base.BaseTeethAgent):
|
||||
def __init__(self, listen_host, listen_port, api_url):
|
||||
super(StandbyAgent, self).__init__(listen_host,
|
||||
@ -51,4 +57,4 @@ class StandbyAgent(base.BaseTeethAgent):
|
||||
for image_info in image_infos:
|
||||
self._validate_image_info(image_info)
|
||||
|
||||
# TODO(russellhaering): Actually cache images
|
||||
return CacheImagesCommand(command_name, image_infos).start()
|
||||
|
Loading…
x
Reference in New Issue
Block a user