tishka17 / clepsydra Goto Github PK
View Code? Open in Web Editor NEWLiquid scheduler for python
License: Apache License 2.0
Liquid scheduler for python
License: Apache License 2.0
We need to pass some context to any task.
It should contain
Task can be planned for one time run or for periodic run.
For periodic tasks we expect:
Tasks must be started concurrently with limitation of number
You need to make a timer test feature
It' s especially useful for cron-timers, because their logic is the most complex.
Example API:
from datetime import datetime
import pytest
from clepsydra.testing import create_test_scheduler, TestScheduler
from clepsydra.rules import CronRule
def first_job(context: dict):
context["tested"] = True
@pytest.fixture
def scheduler() -> TestScheduler:
scheduler = create_test_scheduler()
scheduler.task(first_job)
scheduler.add_task(
"first_job",
CronRule(hour="*", minute=0, second=0)
)
def test_first_job(scheduler: TestScheduler) -> None:
context = scheduler.trigger_tasks(datetime(2021, 3, 3, 5, 0, 0))
assert context.get("tested")
This API is really far from perfect, so I welcome the discussion.
Tasks must be started concurrently with different limitation strategies: by number, by memory and so on
Configure interval per-scheduer and per-job when missed jobs can be executed.
Check different reasons of missing: because of other jobs or because of stopped scheduler
Support to run multuple workers on different severs with single task storage
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.