diff options
author | Frederick Muriuki Muriithi | 2025-05-19 15:47:42 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-05-19 15:47:42 -0500 |
commit | 2b7e941980387e216d6b8d56952abcdb626b742b (patch) | |
tree | 2d58265a848349b1a80ae985fac05e3eb112e057 | |
parent | 72ee14772f1567b5410a2c907ad0dfab7a8e4670 (diff) | |
download | gn-uploader-2b7e941980387e216d6b8d56952abcdb626b742b.tar.gz |
Add "Publication" table to locked tables.
-rw-r--r-- | scripts/load_phenotypes_to_db.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/load_phenotypes_to_db.py b/scripts/load_phenotypes_to_db.py index c034212..b78c648 100644 --- a/scripts/load_phenotypes_to_db.py +++ b/scripts/load_phenotypes_to_db.py @@ -316,17 +316,19 @@ if __name__ == "__main__": # `SHOW OPEN TABLES LIKE 'Publish%';` logger.debug( ("Locking database tables for the connection:" - "\n\t- %s\n\t- %s\n\t- %s\n\t- %s\n"), + "\n\t- %s\n\t- %s\n\t- %s\n\t- %s\n\t- %s\n"), + "Publication", "PublishXRef", "PublishData", "PublishSE", "NStrain") cursor.execute(# Lock the tables to avoid race conditions "LOCK TABLES " - "PublishXRef WRITE, " - "PublishData WRITE, " - "PublishSE WRITE, " - "NStrain WRITE") + "Publication WRITE, " + "PublishXRef WRITE, " + "PublishData WRITE, " + "PublishSE WRITE, " + "NStrain WRITE") try: return load_data(conn, jobs.job(jobs_conn, args.job_id)) except jobs.jobs.JobNotFound as _jne: |