Exemplo n.º 1
0
def test_empty_trace(tmp_path):
    path = tmp_path / "empty_trace.txt"
    with open(path, "w") as f:
        f.write("")
    sched = Scheduler(path,
                      config_path,
                      debug=True,
                      db_path="postgresql://*****:*****@localhost/sentinel")
    sched.start()
Exemplo n.º 2
0
def test_run(monkeypatch):
    def mock_time(obj):
        return 1e8

    def mock_sleep(obj, delay):
        return

    monkeypatch.setattr(Scheduler, "scheduler_time", mock_time)
    monkeypatch.setattr(Scheduler, "scheduler_sleep", mock_sleep)
    sched = Scheduler(trace_path,
                      config_path,
                      debug=True,
                      db_path="postgresql://*****:*****@localhost/sentinel")
    sched.start()
Exemplo n.º 3
0
from scheduler.main_scheduler import Scheduler

scheduler = Scheduler("./all_devices_trace_2m.txt",
                      "./all_devices_config_2m.json")
scheduler.start()