schd 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {schd-0.1.0 → schd-0.1.1}/PKG-INFO +1 -1
- schd-0.1.1/schd/__init__.py +1 -0
- {schd-0.1.0 → schd-0.1.1}/schd/cmds/daemon.py +3 -5
- {schd-0.1.0 → schd-0.1.1}/schd/scheduler.py +5 -5
- {schd-0.1.0 → schd-0.1.1}/schd.egg-info/PKG-INFO +1 -1
- {schd-0.1.0 → schd-0.1.1}/setup.py +1 -1
- schd-0.1.0/schd/__init__.py +0 -1
- {schd-0.1.0 → schd-0.1.1}/README.md +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd/cmds/__init__.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd/cmds/base.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd/cmds/jobs.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd/cmds/run.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd/cmds/schd.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd/cmds/scsendmail.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd/config.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd/email.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd/job.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd/schedulers/__init__.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd/schedulers/remote.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd/util.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd.egg-info/SOURCES.txt +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd.egg-info/dependency_links.txt +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd.egg-info/entry_points.txt +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd.egg-info/requires.txt +0 -0
- {schd-0.1.0 → schd-0.1.1}/schd.egg-info/top_level.txt +0 -0
- {schd-0.1.0 → schd-0.1.1}/setup.cfg +0 -0
- {schd-0.1.0 → schd-0.1.1}/tests/test_config.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/tests/test_email.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/tests/test_scheduler.py +0 -0
- {schd-0.1.0 → schd-0.1.1}/tests/test_util.py +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = '0.1.1'
|
@@ -8,12 +8,10 @@ from schd import __version__ as schd_version
|
|
8
8
|
|
9
9
|
class DaemonCommand(CommandBase):
|
10
10
|
def add_arguments(self, parser):
|
11
|
-
parser.add_argument('--config', '-c')
|
12
11
|
parser.add_argument('--logfile')
|
13
12
|
|
14
|
-
def run(self, args):
|
15
|
-
|
16
|
-
print(f'starting schd, {schd_version}, config_file={config_file}')
|
13
|
+
def run(self, args, config):
|
14
|
+
print(f'starting schd, {schd_version}')
|
17
15
|
|
18
16
|
if args.logfile:
|
19
17
|
log_stream = open(args.logfile, 'a', encoding='utf8')
|
@@ -23,4 +21,4 @@ class DaemonCommand(CommandBase):
|
|
23
21
|
log_stream = sys.stdout
|
24
22
|
|
25
23
|
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(name)s %(levelname)s %(message)s', datefmt='%Y-%m-%d %H:%M:%S', stream=log_stream)
|
26
|
-
asyncio.run(run_daemon(
|
24
|
+
asyncio.run(run_daemon(config))
|
@@ -280,8 +280,7 @@ def build_scheduler(config:SchdConfig):
|
|
280
280
|
return scheduler
|
281
281
|
|
282
282
|
|
283
|
-
async def run_daemon(
|
284
|
-
config = read_config(config_file=config_file)
|
283
|
+
async def run_daemon(config):
|
285
284
|
scheduler = build_scheduler(config)
|
286
285
|
await scheduler.init()
|
287
286
|
|
@@ -329,11 +328,12 @@ async def main():
|
|
329
328
|
parser.add_argument('--logfile')
|
330
329
|
parser.add_argument('--config', '-c')
|
331
330
|
args = parser.parse_args()
|
332
|
-
config_file = args.config
|
333
331
|
|
334
332
|
logging.basicConfig(level=logging.DEBUG)
|
335
333
|
|
336
|
-
|
334
|
+
config = read_config(args.config)
|
335
|
+
print(f'starting schd, {schd_version}')
|
336
|
+
|
337
337
|
|
338
338
|
if args.logfile:
|
339
339
|
log_stream = open(args.logfile, 'a', encoding='utf8')
|
@@ -343,7 +343,7 @@ async def main():
|
|
343
343
|
log_stream = sys.stdout
|
344
344
|
|
345
345
|
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(name)s - %(levelname)s %(message)s', datefmt='%Y-%m-%d %H:%M:%S', stream=log_stream)
|
346
|
-
await run_daemon(
|
346
|
+
await run_daemon(config)
|
347
347
|
|
348
348
|
|
349
349
|
if __name__ == '__main__':
|
schd-0.1.0/schd/__init__.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = '0.1.0'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|