Skip to content

Releases: Nanguage/executor-engine

0.3.0

03 Jan 08:08
Compare
Choose a tag to compare

Full Changelog: 0.2.9...0.3.0

0.2.9

03 Jan 06:49
Compare
Choose a tag to compare

Support cron job.

Example:

import asyncio

from executor.engine import Engine
from executor.engine.job.extend.cron import CronJob, every

engine = Engine()


async def main():
    def do_something():
        print("hello")

    job = CronJob(do_something, every("1s"))
    await engine.submit_async(job)
    await engine.wait_async()


asyncio.run(main())

Full Changelog: 0.2.8...0.2.9

0.2.8

02 Jan 20:32
Compare
Choose a tag to compare

Support use async function

Full Changelog: 0.2.7...0.2.8

0.2.7

28 Sep 14:27
Compare
Choose a tag to compare

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:

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: 0.2.6...0.2.7

0.2.6

28 Sep 02:59
Compare
Choose a tag to compare

What's Changed

Generator support: #3

New Contributors

Full Changelog: 0.2.5...0.2.6

0.2.5

12 Mar 09:38
Compare
Choose a tag to compare

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

Full Changelog: 0.2.4...0.2.5

0.2.4

07 Mar 16:46
Compare
Choose a tag to compare

Full Changelog: 0.2.3...0.2.4

0.2.3

09 Feb 14:46
Compare
Choose a tag to compare
  • Allow set use discache or not in the EngineSetting
  • Not using the diskcache by default

Full Changelog: 0.2.2...0.2.3

0.2.2

21 Jul 01:02
Compare
Choose a tag to compare

Full Changelog: 0.2.1...0.2.2

0.2.1

20 Jul 13:51
Compare
Choose a tag to compare

Allow specify jobs in the engine.join function.