fixRunHistoryEndTimesViaNearline Namespace Reference


 conn = psycopg2.connect("dbname=nova_prod port=5432 user=novadaq")
 conn2 = psycopg2.connect("dbname=nova_prod port=5433 user=nova_reader")
 cur = conn.cursor()
 cur2 = conn2.cursor()
string SQL = "select run,tstart from fardet.runs where tstop is NULL order by run desc"
 rows = cur.fetchall()
tuple runlist = (x for x in rows[1:])
 maxsubrun = cur2.fetchone()[0]
 minsubrun = cur2.fetchone()[0]
 endtime = cur2.fetchall()
 starttime = cur2.fetchall()
 tdiff = run[1]-starttime[0][0]+timedelta(minutes=5)
 nhour = int(tdiff.total_seconds()/(60*60))
 toff = timedelta(hours=nhour)
 newtimestamp = endtime[0][0]+toff

Variable Documentation

fixRunHistoryEndTimesViaNearline.conn = psycopg2.connect("dbname=nova_prod port=5432 user=novadaq")

Definition at line 6 of file

fixRunHistoryEndTimesViaNearline.conn2 = psycopg2.connect("dbname=nova_prod port=5433 user=nova_reader")

Definition at line 13 of file

fixRunHistoryEndTimesViaNearline.cur = conn.cursor()

Definition at line 18 of file

fixRunHistoryEndTimesViaNearline.cur2 = conn2.cursor()

Definition at line 19 of file

Referenced by LZ4HC_compress_optimal().

fixRunHistoryEndTimesViaNearline.endtime = cur2.fetchall()

Definition at line 38 of file

fixRunHistoryEndTimesViaNearline.maxsubrun = cur2.fetchone()[0]

Definition at line 31 of file

fixRunHistoryEndTimesViaNearline.minsubrun = cur2.fetchone()[0]

Definition at line 34 of file

fixRunHistoryEndTimesViaNearline.newtimestamp = endtime[0][0]+toff

Definition at line 46 of file

fixRunHistoryEndTimesViaNearline.nhour = int(tdiff.total_seconds()/(60*60))

Definition at line 43 of file

fixRunHistoryEndTimesViaNearline.rows = cur.fetchall()

Definition at line 25 of file

tuple fixRunHistoryEndTimesViaNearline.runlist = (x for x in rows[1:])

Definition at line 26 of file

Referenced by GetManualSubruns().

string fixRunHistoryEndTimesViaNearline.SQL = "select run,tstart from fardet.runs where tstop is NULL order by run desc"

Definition at line 21 of file

fixRunHistoryEndTimesViaNearline.starttime = cur2.fetchall()

Definition at line 41 of file

fixRunHistoryEndTimesViaNearline.tdiff = run[1]-starttime[0][0]+timedelta(minutes=5)
fixRunHistoryEndTimesViaNearline.toff = timedelta(hours=nhour)

Definition at line 45 of file