Skip to content

Commit

Permalink
ami_creator: print out the lock file content if found
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacopo committed May 23, 2021
1 parent 67e9613 commit b8cc3cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ami_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def delete_old_amis():

if __name__ == "__main__":
MY_LOCK_FILE = '/run/lock/ami_creator_active.lock'
if os.path.exists(MY_LOCK_FILE): os.system("echo '#### LOCK FILE EXISTED, IT SAYS: #####'; cat " + MY_LOCK_FILE + "; echo; echo") # Just for debugging
with open(MY_LOCK_FILE, 'x') as lf:
lf.write("Started at: {}\nPID: {}\nPPID: {}\n".format(time.asctime(), os.getpid(), os.getppid()))

Expand Down

0 comments on commit b8cc3cd

Please sign in to comment.