Skip to content

Commit 2bcd815

Browse files
committed
exit with 0 if task is already running/queued
1 parent eb44fbc commit 2bcd815

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

HISTORY.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
Release History
44
---------------
55

6+
2.0.1 (2021-04-06)
7+
++++++++++++++++++
8+
9+
**Bugfixes**
10+
11+
- Exit with 0 in ``ia tasks --cmd ...`` if a task is already queued or running.
12+
613
2.0.0 (2021-04-05)
714
++++++++++++++++++
815

internetarchive/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from __future__ import absolute_import
3838

3939
__title__ = 'internetarchive'
40-
__version__ = '2.0.0'
40+
__version__ = '2.0.1'
4141
__author__ = 'Jacob M. Johnson'
4242
__license__ = 'AGPL 3'
4343
__copyright__ = 'Copyright (C) 2012-2019 Internet Archive'

internetarchive/cli/ia_tasks.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ def main(argv, session):
9898
if j.get('success'):
9999
print('success: {}'.format(j.get('value', dict()).get('log')))
100100
sys.exit(0)
101+
elif 'already queued/running' in j.get('error', ''):
102+
print('success: {} task already queued/running'.format(args['--cmd']))
103+
sys.exit(0)
101104
else:
102105
print('error: {}'.format(j.get('error')))
103106
sys.exit(1)

0 commit comments

Comments
 (0)