Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error message if batou deployment is already runnning #476

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

elikoga
Copy link
Member

@elikoga elikoga commented Oct 15, 2024

solves #446

@elikoga elikoga requested a review from zagy as a code owner October 15, 2024 03:21
# XXX can we make this not leave files around?
with open(filename, "a+") as lockfile:
try:
fcntl.lockf(lockfile, fcntl.LOCK_EX | fcntl.LOCK_NB)
except IOError:
print("Could not acquire lock {}".format(filename), file=sys.stderr)
if exit_on_failure:
print(
"Another instance of batou may be running, or a stale lock file may exist.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message is misleading. The lockfile is never deleted.

zagy
zagy previously approved these changes Oct 15, 2024
@zagy zagy merged commit 1e0d7a2 into main Oct 15, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants