Fetch manifest at startup
This commit is contained in:
@@ -64,6 +64,7 @@ class Client(threadedclient.WebSocketClient):
|
|||||||
def Loop(self):
|
def Loop(self):
|
||||||
self.daemon = True
|
self.daemon = True
|
||||||
self.connect()
|
self.connect()
|
||||||
|
self._OnNewManifest2()
|
||||||
while True:
|
while True:
|
||||||
report = {
|
report = {
|
||||||
'hostname': socket.gethostname(),
|
'hostname': socket.gethostname(),
|
||||||
@@ -91,6 +92,9 @@ class Client(threadedclient.WebSocketClient):
|
|||||||
def _OnNewManifest(self, data):
|
def _OnNewManifest(self, data):
|
||||||
if data['image_type'] != self._config['image_type']:
|
if data['image_type'] != self._config['image_type']:
|
||||||
return
|
return
|
||||||
|
self._OnNewManifest2()
|
||||||
|
|
||||||
|
def _OnNewManifest2(self):
|
||||||
fetch = fetcher.Fetcher(
|
fetch = fetcher.Fetcher(
|
||||||
'https://%s/image/%s' % (FLAGS.server, self._config['image_type']),
|
'https://%s/image/%s' % (FLAGS.server, self._config['image_type']),
|
||||||
FLAGS.ca_cert,
|
FLAGS.ca_cert,
|
||||||
|
|||||||
Reference in New Issue
Block a user