Skip to content

Commit

Permalink
Check for running tap without acquiring lock
Browse files Browse the repository at this point in the history
  • Loading branch information
judahrand committed Oct 6, 2022
1 parent bfede94 commit 4dde373
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pipelinewise/cli/pipelinewise.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,19 +959,17 @@ def detect_tap_status(self, target_id, tap_id):
}

# Tap exists but configuration not completed
lock = self.get_lock(target_id, tap_id)
if not os.path.isfile(connector_files['config']):
status['currentStatus'] = 'not-configured'

# Configured and not running
elif lock.acquire(blocking=False):
lock.release()
status['currentStatus'] = 'ready'

# Tap exists and in running status
else:
elif self.get_lock(target_id, tap_id).locked():
status['currentStatus'] = 'running'

# Configured and not running
else:
status['currentStatus'] = 'ready'

# Get last run instance
if os.path.isdir(log_dir):
log_files = utils.search_log_files(
Expand Down

0 comments on commit 4dde373

Please sign in to comment.