Skip to content

Commit

Permalink
Check for lock
Browse files Browse the repository at this point in the history
  • Loading branch information
caufieldjh committed Sep 3, 2021
1 parent 5d4c6a3 commit 3e9cddb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"""

import click #type: ignore
import os
import sys
from kg_obo.transform import run_transform

@click.command()
Expand All @@ -29,7 +31,11 @@
is_flag=True,
help="If used, upload to S3 bucket is tested only.")
def run(skip, get_only, bucket, save_local, s3_test):
run_transform(skip, get_only, bucket, save_local, s3_test)
if os.path.isfile("lock"):
sys.exit("KG-OBO is already running. Exiting...")
else:
lockfile = open
run_transform(skip, get_only, bucket, save_local, s3_test)

if __name__ == '__main__':
run()

0 comments on commit 3e9cddb

Please sign in to comment.