Class peagen.worker.PeagenWorker
peagen.worker.PeagenWorker
PeagenWorker()
Bases: WorkerBase
Source code in peagen/worker/__init__.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
pool
instance-attribute
pool = pool or getenv('PEAGEN_POOL', DEFAULT_POOL_NAME)
gateway
instance-attribute
gateway = gateway or getenv(
"PEAGEN_GATEWAY", DEFAULT_GATEWAY
)
worker_id
instance-attribute
worker_id = worker_id or getenv('PEAGEN_WORKER_ID', None)
port
instance-attribute
port = port or int(getenv('PORT', 8001))
host
instance-attribute
host = host or getenv('PEAGEN_HOST') or _local_ip()
listen_at
instance-attribute
listen_at = f'http://{host}:{port}/rpc'
app
instance-attribute
app = FastAPI(title='Peagen Worker')
ready
instance-attribute
ready = False
register_handler
register_handler(name, func)
Source code in peagen/worker/base.py
119 120 121 122 123 124 125 |
|