schd 0.0.15__tar.gz → 0.0.16__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: schd
3
- Version: 0.0.15
3
+ Version: 0.0.16
4
4
  Home-page: https://github.com/kevenli/schd
5
5
  License: ApacheV2
6
6
  Requires-Dist: apscheduler<4.0
@@ -0,0 +1 @@
1
+ __version__ = '0.0.16'
@@ -12,8 +12,5 @@ class JobsCommand(CommandBase):
12
12
 
13
13
  def run(self, args):
14
14
  config = read_config(config_file=args.config)
15
- for job_name, job_config in config['jobs'].items():
16
- job_class_name = job_config.pop('class')
17
- job_cron = job_config.pop('cron')
18
- # print(f'{job_name} : {job_class_name} {job_cron}')
15
+ for job_name, _ in config.jobs.items():
19
16
  print(job_name)
@@ -1,5 +1,4 @@
1
1
  import logging
2
- import yaml
3
2
  from schd.cmds.base import CommandBase
4
3
  from schd.scheduler import build_job, read_config, JobContext
5
4
 
@@ -7,11 +6,9 @@ from schd.scheduler import build_job, read_config, JobContext
7
6
  def run_job(config_file, job_name):
8
7
  config = read_config(config_file)
9
8
 
10
- job_config = config['jobs'][job_name]
9
+ job_config = config.jobs[job_name]
11
10
 
12
- job_class_name = job_config.pop('class')
13
- job_cron = job_config.pop('cron')
14
- job = build_job(job_name, job_class_name, job_config)
11
+ job = build_job(job_name, job_config.cls, job_config)
15
12
  job_context = JobContext(job_name)
16
13
  job_context.output_to_console = True
17
14
  job(context=job_context)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: schd
3
- Version: 0.0.15
3
+ Version: 0.0.16
4
4
  Home-page: https://github.com/kevenli/schd
5
5
  License: ApacheV2
6
6
  Requires-Dist: apscheduler<4.0
@@ -7,7 +7,7 @@ def read_requirements():
7
7
 
8
8
  setup(
9
9
  name="schd",
10
- version="0.0.15",
10
+ version="0.0.16",
11
11
  url="https://github.com/kevenli/schd",
12
12
  packages=find_packages(exclude=('tests', 'tests.*')),
13
13
  install_requires=['apscheduler<4.0', 'pyaml', 'aiohttp'],
@@ -1 +0,0 @@
1
- __version__ = '0.0.15'
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