@@ -106,7 +106,7 @@ def doImageJob(args, imageJob):
106
106
name = imageJob .name .replace ('.frag' ,'' )
107
107
fragFile = name + '.frag'
108
108
jsonFile = name + '.json'
109
- png = 'image .png'
109
+ png = 'image_0 .png'
110
110
log = 'vklog.txt'
111
111
112
112
res = tt .ImageJobResult ()
@@ -191,7 +191,7 @@ def doImageJob(args, imageJob):
191
191
192
192
################################################################################
193
193
194
- def get_service (server , args ):
194
+ def get_service (server , args , worker_info_json_string ):
195
195
try :
196
196
httpClient = THttpClient .THttpClient (server )
197
197
transport = TTransport .TBufferedTransport (httpClient )
@@ -200,14 +200,7 @@ def get_service(server, args):
200
200
transport .open ()
201
201
202
202
# Get token
203
-
204
- # TODO: grab information from worker
205
-
206
- platforminfo = '''
207
- {
208
- "clientplatform": "Wrapper on vulkan"
209
- }
210
- '''
203
+ platforminfo = worker_info_json_string
211
204
212
205
tryToken = args .token
213
206
print ("Call getToken()" )
@@ -294,6 +287,21 @@ def isDeviceAvailable(serial):
294
287
295
288
service = None
296
289
290
+ # Get worker info
291
+ worker_info_file = 'worker_info.json'
292
+ remove (worker_info_file )
293
+
294
+ if args .linux :
295
+ vkrun .dump_info_linux ()
296
+ else :
297
+ vkrun .dump_info_android ()
298
+
299
+ assert (os .path .exists (worker_info_file ))
300
+
301
+ worker_info_json_string = '{}' # Dummy but valid JSON string
302
+ with open (worker_info_file , 'r' ) as f :
303
+ worker_info_json_string = f .read ()
304
+
297
305
# Main loop
298
306
while True :
299
307
@@ -302,7 +310,7 @@ def isDeviceAvailable(serial):
302
310
exit (1 )
303
311
304
312
if not (service ):
305
- service , token = get_service (server , args )
313
+ service , token = get_service (server , args , worker_info_json_string )
306
314
307
315
if not (service ):
308
316
print ("Cannot connect to server, retry in a second..." )
0 commit comments