Executor-engine

Latest version: v0.2.7

Safety actively analyzes 682404 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.2.7

Support the `send` method for the generator, this feature can be used for pass data to the generator, it allow executor communicate with another thread/process:

python
import asyncio
from executor.engine import Engine, ProcessJob

def calculator():
res = None
while True:
expr = yield res
res = eval(expr)


async def main():
with Engine() as engine:
job = ProcessJob(calculator)
await engine.submit_async(job)
await job.wait_until_status("running")
g = job.result()
g.send(None) initialize the generator
print(g.send("1 + 2")) 3
print(g.send("3 * 4")) 12
print(g.send("(1 + 2) * 4")) 12

asyncio.run(main())



**Full Changelog**: https://github.com/Nanguage/executor-engine/compare/0.2.6...0.2.7

0.2.6

What's Changed

Generator support: 3

* support sync generator by liunux4odoo in https://github.com/Nanguage/executor-engine/pull/5
* support generator for LocalJob & ThreadJob & DaskJob by liunux4odoo in https://github.com/Nanguage/executor-engine/pull/6

New Contributors
* liunux4odoo made their first contribution in https://github.com/Nanguage/executor-engine/pull/5

**Full Changelog**: https://github.com/Nanguage/executor-engine/compare/0.2.5...0.2.6

0.2.5

Support `Job.wait_until` method, wait for the job to reach a certain state.

**Full Changelog**: https://github.com/Nanguage/executor-engine/compare/0.2.4...0.2.5

0.2.4

**Full Changelog**: https://github.com/Nanguage/executor-engine/compare/0.2.3...0.2.4

0.2.3

+ Allow set use discache or not in the EngineSetting
+ Not using the diskcache by default

**Full Changelog**: https://github.com/Nanguage/executor-engine/compare/0.2.2...0.2.3

0.2.2

**Full Changelog**: https://github.com/Nanguage/executor-engine/compare/0.2.1...0.2.2

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.