Commit fe641370 authored by Zhang Xiaoli's avatar Zhang Xiaoli
Browse files

modify admL1 to adm-L1, the method of getting job-id is different.

parent 0a669f09
IMAGE_NAME:=csst/adml1 IMAGE_NAME:=csst/adm-l1
build: build:
docker build --network=host -t $(IMAGE_NAME) . docker build --network=host -t $(IMAGE_NAME) .
...@@ -13,4 +13,4 @@ run: ...@@ -13,4 +13,4 @@ run:
down: down:
docker stop $(IMAGE_NAME) docker stop $(IMAGE_NAME)
scp: scp:
scp -r ./ csst-zjs:/root/csst/admL1/ scp -r ./ csst-zjs:/root/csst/adm-L1/
\ No newline at end of file \ No newline at end of file
...@@ -22,14 +22,15 @@ class admL1Api(): ...@@ -22,14 +22,15 @@ class admL1Api():
#取环境变量中模块id,需预先设定 #取环境变量中模块id,需预先设定
#current_job_id=os.getenv('CSST_ADML1_APPID') #current_job_id=os.getenv('CSST_ADML1_APPID')
# conn = psycopg2.connect(host="10.255.2.12",port=5433,user="scalebox",password="changeme",database="scalebox") # conn = psycopg2.connect(host="10.255.2.12",port=5433,user="scalebox",password="changeme",database="scalebox")
conn = psycopg2.connect(host=shost,port=sport,user=suser,password=spwd,database=sdb) # conn = psycopg2.connect(host=shost,port=sport,user=suser,password=spwd,database=sdb)
cursor = conn.cursor() # cursor = conn.cursor()
#sql ="SELECT id,name FROM t_app ;" # #sql ="SELECT id,name FROM t_app ;"
#根据admL1的名字查找它的jobid # #根据admL1的名字查找它的jobid
admsql = "SELECT id FROM t_job where name = 'admL1'" # admsql = "SELECT id FROM t_job where name = 'adm-L1'"
cursor.execute(admsql) # cursor.execute(admsql)
admrows = cursor.fetchone() # admrows = cursor.fetchone()
current_job_id = admrows[0] # current_job_id = admrows[0]
current_job_id=os.getenv('JOB_ID')
sink_job_name="" sink_job_name=""
if obsid==1: if obsid==1:
admL1Api.sum_numbers(body,"msc-l1-mbi",current_job_id) admL1Api.sum_numbers(body,"msc-l1-mbi",current_job_id)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment