mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 12:36:31 +00:00
write logs for inference and loader to file
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import threading
|
||||
from threading import Thread
|
||||
import traceback
|
||||
cimport constants
|
||||
from credentials cimport Credentials
|
||||
from remote_command cimport RemoteCommand, CommandType
|
||||
from remote_command_handler cimport RemoteCommandHandler
|
||||
@@ -29,7 +30,7 @@ cdef class CommandProcessor:
|
||||
self.shutdown_event.wait(timeout=1.0)
|
||||
except Exception as e:
|
||||
traceback.print_exc()
|
||||
print('EXIT!')
|
||||
constants.log('EXIT!')
|
||||
|
||||
|
||||
cdef on_command(self, RemoteCommand command):
|
||||
@@ -66,7 +67,7 @@ cdef class CommandProcessor:
|
||||
else:
|
||||
pass
|
||||
except Exception as e:
|
||||
print(f"Error handling client: {e}")
|
||||
constants.logerror(f"Error handling client: {e}")
|
||||
err_command = RemoteCommand(CommandType.ERROR, None, str(e))
|
||||
self.remote_handler.send(command.client_id, err_command.serialize())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user