oh-my-batch 0.5.6__tar.gz → 0.5.7__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: oh-my-batch
3
- Version: 0.5.6
3
+ Version: 0.5.7
4
4
  Summary:
5
5
  License: GPL
6
6
  Author: weihong.xu
@@ -88,13 +88,16 @@ class BaseJobManager:
88
88
 
89
89
  time.sleep(interval)
90
90
 
91
- error = False
91
+ raise_err = False
92
92
  for job in jobs:
93
- if not JobState.is_success(job['state']):
93
+ if not JobState.is_terminal(job['state']):
94
+ logger.warning('Job %s is running, current state: %s', job['script'], job['state'])
95
+ raise_err = True
96
+ elif not JobState.is_success(job['state']):
94
97
  logger.error('Job %s failed', job['script'])
95
- error = True
96
- if error and wait:
97
- raise RuntimeError('Some jobs failed')
98
+ raise_err = True
99
+ if raise_err and wait:
100
+ raise RuntimeError('Some jobs failed or not finished yet')
98
101
 
99
102
  def wait(self, *job_ids, timeout=None, interval=10):
100
103
  """
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "oh-my-batch"
3
- version = "0.5.6"
3
+ version = "0.5.7"
4
4
  description = ""
5
5
  authors = ["weihong.xu <xuweihong.cn@gmail.com>"]
6
6
  license = "GPL"
File without changes
File without changes