Skip to content
Snippets Groups Projects

Deployed version as on 31.08.2020 on xcal

Merged Karim Ahmed requested to merge xcal_deployed into master
3 unresolved threads
2 files
+ 17
5
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 29
0
import argparse
import sqlite3
parser = argparse.ArgumentParser(
description='Update run status at MDC for a given run id.')
parser.add_argument('--sqlite-fpath', type=str, help='Path to sqlite file path',
default='/home/xcal/calibration_webservice/webservice/webservice_jobs.sqlite') # noqa
parser.add_argument('--run', type=str, help='The run number required '
' for checking its job status.')
parser.add_argument('--proposal', type=str, help='Proposal numer')
args = vars(parser.parse_args())
sqlite_fpath = args['sqlite_fpath']
proposal = args['proposal'].zfill(6)
run = args['run']
conn = sqlite3.connect(sqlite_fpath)
c = conn.cursor()
c.execute("SELECT * FROM jobs")
for r in c.fetchall():
rid, jobid, db_proposal, db_run, status, time, _, _ = r
if db_proposal == proposal and db_run == run:
print(r)
    • Why is this file part of this MR? Is this file intended to be part of the various tools? If so, it should have documentation, and perhaps an entry point in the setup.py, with proper arguments.

      • it is a script we found in the production environment and we thought to include it in the master to have a track overall relevant changes from production.

        It wouldn't be included to setup.py as I can see that it is used as a script to review the status of SLURM jobs from the SQLite table.

        But indeed it needs multiple modifications. Documentation, exposing the input variable through a CLI, ..

        Edited by Karim Ahmed
      • Please register or sign in to reply
Please register or sign in to reply
Loading