schd 0.0.13__tar.gz → 0.0.15__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.0.13 → schd-0.0.15}/PKG-INFO +1 -1
- schd-0.0.15/schd/__init__.py +1 -0
- {schd-0.0.13 → schd-0.0.15}/schd/schedulers/remote.py +13 -5
- {schd-0.0.13 → schd-0.0.15}/schd.egg-info/PKG-INFO +1 -1
- {schd-0.0.13 → schd-0.0.15}/setup.py +1 -1
- schd-0.0.13/schd/__init__.py +0 -1
- {schd-0.0.13 → schd-0.0.15}/LICENSE +0 -0
- {schd-0.0.13 → schd-0.0.15}/README.md +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd/cmds/__init__.py +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd/cmds/base.py +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd/cmds/daemon.py +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd/cmds/jobs.py +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd/cmds/run.py +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd/cmds/schd.py +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd/config.py +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd/job.py +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd/scheduler.py +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd/schedulers/__init__.py +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd/util.py +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd.egg-info/SOURCES.txt +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd.egg-info/dependency_links.txt +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd.egg-info/entry_points.txt +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd.egg-info/requires.txt +0 -0
- {schd-0.0.13 → schd-0.0.15}/schd.egg-info/top_level.txt +0 -0
- {schd-0.0.13 → schd-0.0.15}/setup.cfg +0 -0
- {schd-0.0.13 → schd-0.0.15}/tests/test_scheduler.py +0 -0
- {schd-0.0.13 → schd-0.0.15}/tests/test_util.py +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = '0.0.15'
|
@@ -76,8 +76,8 @@ class RemoteApiClient:
|
|
76
76
|
data.add_field('logfile', f, filename=os.path.basename(logfile_path), content_type='application/octet-stream')
|
77
77
|
|
78
78
|
async with session.put(upload_url, data=data) as resp:
|
79
|
-
|
80
|
-
|
79
|
+
logger.info("Status: %d", resp.status)
|
80
|
+
logger.info("Response: %s", await resp.text())
|
81
81
|
|
82
82
|
|
83
83
|
class RemoteScheduler:
|
@@ -107,7 +107,7 @@ class RemoteScheduler:
|
|
107
107
|
logger.info('start_main_loop ')
|
108
108
|
try:
|
109
109
|
async for event in self.client.subscribe_worker_eventstream(self._worker_name):
|
110
|
-
|
110
|
+
logger.info('got event, %s', event)
|
111
111
|
job_name = event['data']['job_name']
|
112
112
|
instance_id = event['data']['id']
|
113
113
|
_, queue_name = self._jobs[job_name]
|
@@ -143,10 +143,18 @@ class RemoteScheduler:
|
|
143
143
|
text_stream = io.TextIOWrapper(output_stream, encoding='utf-8')
|
144
144
|
|
145
145
|
context = JobContext(job_name=job_name, stdout=text_stream)
|
146
|
+
logger.info('starting job %s@%d', job_name, instance_id)
|
146
147
|
await self.client.update_job_instance(self._worker_name, job_name, instance_id, status='RUNNING')
|
147
148
|
try:
|
148
|
-
|
149
|
-
|
149
|
+
def execute_job():
|
150
|
+
with redirect_stdout(text_stream):
|
151
|
+
job_result = job.execute(context)
|
152
|
+
return job_result
|
153
|
+
|
154
|
+
loop = asyncio.get_running_loop()
|
155
|
+
job_result = await loop.run_in_executor(
|
156
|
+
None, execute_job
|
157
|
+
)
|
150
158
|
|
151
159
|
if job_result is None:
|
152
160
|
ret_code = 0
|
schd-0.0.13/schd/__init__.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = '0.0.12'
|
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
|