Python Client for Workq with asyncio .
Requirements
Python3.5+
Usage
Enqueue Foreground Job
import asyncio
import uuid
from workq.workq import WorkqClient
from workq.job import ForegroundJob
def main():
loop = asyncio.new_event_loop()
client = WorkqClient('127.0.0.1', 9922, loop)
jobid = uuid.uuid4()
job = ForegroundJob(jobid, "ping1", 5000, 60000, "hello fg job")
try:
loop.run_until_complete(client.connect())
results = loop.run_until_complete(client.run(job))
finally:
loop.close()
for result in results:
print("job: %s %s %s" % (result.id, result.name, result.payload))
if __name__ == '__main__':
main()
TODO
[ ] inspect command
Release files for python-workq 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python-workq-0.1.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_workq-0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 10.0 kB
Release files / python-workq-0.1.tar.gz
| Download URL | python-workq-0.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1fdc0860b930bd99a7d5fed4d22a23740139eaa219f5368d092c11f0a566360
|
|
BLAKE2b-256 checksum How to use checksums |
78e15c9473c001873d7759016305702c5ac317dc378c67e7ae590863d062f317
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / python_workq-0.1-py2.py3-none-any.whl
| Download URL | python_workq-0.1-py2.py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
325f66d88e232d4f1a36af4988df6ff548219e227661ce065e34031345b16005
|
|
BLAKE2b-256 checksum How to use checksums |
02aa53d30db8cab8b2205af2dbfb76b1ff035cce8eac394ea1b8dcd651c7fe4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |