zaku.server
Task Server#
- class zaku.server.Redis[source]#
Bases:
ParamsProtoRedis Configuration for the TaskServer class.
# Put this into an .env file REDIS_HOST=localhost REDIS_PORT=6379 REDIS_PASSWORD=xxxxxxxxxxxxxxxxxxx REDIS_DB=0
CLI Options:
--redis.host :str 'localhost' --redis.port :int 6379 --redis.password :any None --redis.db :any 0
- host = 'localhost'#
- port = 6379#
- password = None#
- db = 0#
The logical redis database, from 0 - 15.
- class zaku.server.TaskServer[source]#
Bases:
ParamsProto,ServerTaskServer
This is the server that maintains the Task Queue.
Usage
app = TaskServer() app.run()
CLI Options
python -m zaku.server --help -h, --help show this help message and exit --prefix :str 'Zaku-task-queues' --queue-len :int 100 --port :int 9000 --free-port :bool True --static-root :str '.' --cors :str 'https://vuer.ai,https://dash.ml,http://lo... --cert :str None the path to the SSL certificate --key :str None the path to the SSL key --ca-cert :str None the trusted root CA certificates --create-queue :function <function TaskServer.create_queue at 0x102... --add-job :function <function TaskServer.add_job at 0x102d89800> --reset-handler :function <function TaskServer.reset_handler at 0x10... --remove-handle :function <function TaskServer.remove_handle at 0x10... --take-handler :function <function TaskServer.take_handler at 0x102... --run :function <function TaskServer.run at 0x102d89a80>
- prefix = 'Zaku-task-queues'#
- queue_len = 100#
- port: int = 9000#
- free_port = True#
- static_root = '.'#
- cors: str = 'https://vuer.ai,https://dash.ml,http://localhost:8000,http://127.0.0.1:8000,*'#
Enable CORS
- cert: str = None#
the path to the SSL certificate
- key: str = None#
the path to the SSL key
- ca_cert: str = None#
the trusted root CA certificates
- WEBSOCKET_MAX_SIZE = 268435456#
- host: str = 'localhost'#