Python Client for Workq
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python-workq-0.1.tar.gz
(4.3 kB
view details)
Built Distribution
File details
Details for the file python-workq-0.1.tar.gz
.
File metadata
- Download URL: python-workq-0.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1fdc0860b930bd99a7d5fed4d22a23740139eaa219f5368d092c11f0a566360 |
|
MD5 | f3b348e888786e30daed8564548dc8a7 |
|
BLAKE2b-256 | 78e15c9473c001873d7759016305702c5ac317dc378c67e7ae590863d062f317 |
File details
Details for the file python_workq-0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: python_workq-0.1-py2.py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 325f66d88e232d4f1a36af4988df6ff548219e227661ce065e34031345b16005 |
|
MD5 | f23b3bbbbf9ebcd6e85feab2d06e134b |
|
BLAKE2b-256 | 02aa53d30db8cab8b2205af2dbfb76b1ff035cce8eac394ea1b8dcd651c7fe4c |