~yerinalexey/pcrond

cf699d50cc90d3569245cbb453b48ff7a9818e40 — Alexey Yerin 5 months ago 6955877
refactor: remove default Scheduler instance
2 files changed, 3 insertions(+), 5 deletions(-)

M pcrond/__init__.py
M scripts/pcrond
M pcrond/__init__.py => pcrond/__init__.py +0 -4
@@ 1,10 1,6 @@

# Here, flake8 gives error F401 '.job.Job' imported but unused
# However I have to import that, don't I ?
# pylint: disable-msg=F401
from .job import Job
from .sched import Scheduler
from .cronparser import Parser

# default instance
scheduler = Scheduler()

M scripts/pcrond => scripts/pcrond +3 -1
@@ 24,6 24,8 @@ if __name__ == "__main__":
        print(VERSION)
        exit(0)

    from pcrond import scheduler
    from pcrond import Scheduler

    scheduler = Scheduler()
    scheduler.load_crontab_file(args.crontabfile)
    scheduler.main_loop()