https://github.com/pykit3/k3wsjobd
This module is a gevent based websocket server. When the server receives a job description from a client, it runs that job asynchronously in a thread, and reports the progress back to the client periodically.
https://github.com/pykit3/k3wsjobd
python thread
Last synced: 4 months ago
JSON representation
This module is a gevent based websocket server. When the server receives a job description from a client, it runs that job asynchronously in a thread, and reports the progress back to the client periodically.
- Host: GitHub
- URL: https://github.com/pykit3/k3wsjobd
- Owner: pykit3
- License: mit
- Created: 2021-08-20T09:18:51.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-08-28T12:39:02.000Z (9 months ago)
- Last Synced: 2025-08-28T20:01:05.465Z (9 months ago)
- Topics: python, thread
- Language: Python
- Homepage: https://blog.openacid.com
- Size: 35.2 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# k3wsjobd
[](https://github.com/pykit3/k3wsjobd/actions/workflows/python-package.yml)
[](https://k3wsjobd.readthedocs.io/en/stable/?badge=stable)
[](https://pypi.org/project/k3wsjobd)
This module is a gevent based websocket server. When the server receives a job description from a client, it runs that job asynchronously in a thread, and reports the progress back to the client periodically.
k3wsjobd is a component of [pykit3] project: a python3 toolkit set.
This module is a gevent based websocket server. When the server receives a job description from a client,
it runs that job asynchronously in a thread, and reports the progress back to the client periodically.
# Install
```
pip install k3wsjobd
```
# Synopsis
```python
from geventwebsocket import Resource, WebSocketServer
import k3wsjobd
from k3wsjobd import logging
def run():
k3wsjobd.run(ip='127.0.0.1', port=33445)
if __name__ == "__main__":
logger = logging.getLogger()
logger.setLevel(logging.INFO)
file_handler = logging.FileHandler('wsjobd.log')
formatter = logging.Formatter('[%(asctime)s, %(levelname)s] %(message)s')
file_handler.setFormatter(formatter)
logger.addHandler(file_handler)
run()
```
# Author
Zhang Yanpo (张炎泼)
# Copyright and License
The MIT License (MIT)
Copyright (c) 2015 Zhang Yanpo (张炎泼)
[pykit3]: https://github.com/pykit3