mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 23:46:30 +00:00
add resource check
incorrect pass / hw handling in a loader
This commit is contained in:
@@ -44,6 +44,9 @@ cdef class CommandProcessor:
|
||||
if command.command_type == CommandType.LOGIN:
|
||||
self.api_client.set_credentials(Credentials.from_msgpack(command.data))
|
||||
self.remote_handler.send(command.client_id, self.ok_response.serialize())
|
||||
elif command.command_type == CommandType.CHECK_RESOURCE:
|
||||
self.api_client.check_resource()
|
||||
self.remote_handler.send(command.client_id, RemoteCommand(CommandType.OK).serialize())
|
||||
elif command.command_type == CommandType.LOAD:
|
||||
file_data = FileData.from_msgpack(command.data)
|
||||
file_bytes = self.api_client.load_bytes(file_data.filename, file_data.folder)
|
||||
@@ -61,9 +64,6 @@ cdef class CommandProcessor:
|
||||
data = UploadFileData.from_msgpack(command.data)
|
||||
file_bytes = self.api_client.upload_big_small_resource(data.resource, data.filename, data.folder)
|
||||
self.remote_handler.send(command.client_id, RemoteCommand(CommandType.OK).serialize())
|
||||
elif command.command_type == CommandType.EXIT:
|
||||
t = Thread(target=self.stop) # non-block worker:
|
||||
t.start()
|
||||
else:
|
||||
pass
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user