231
This commit is contained in:
parent
abe873d7bb
commit
e07ebb87cb
|
@ -113,10 +113,10 @@ function Operation2() {
|
||||||
operateID
|
operateID
|
||||||
})
|
})
|
||||||
const result=detectionSrc.data['result']
|
const result=detectionSrc.data['result']
|
||||||
if(result==='OK'){
|
if(result==='NO'){
|
||||||
alert('连接成功')
|
|
||||||
}else{
|
|
||||||
alert('连接失败')
|
alert('连接失败')
|
||||||
|
}else{
|
||||||
|
alert('连接成功')
|
||||||
}
|
}
|
||||||
}catch{
|
}catch{
|
||||||
alert('detection出错')
|
alert('detection出错')
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import k8s_func
|
import k8s_func
|
||||||
studentList=['n20240101-53','s20240101-50','s20240102-50']
|
studentList=['n20240101-55']
|
||||||
|
|
||||||
for i in studentList:
|
for i in studentList:
|
||||||
k8s_func.delete_pod(i)
|
k8s_func.delete_pod(i)
|
||||||
|
|
|
@ -76,7 +76,8 @@ def delete_pod(name):
|
||||||
def check_dm(name):
|
def check_dm(name):
|
||||||
try:
|
try:
|
||||||
service = v1.read_namespaced_service(name=name + "-service", namespace=namespace)
|
service = v1.read_namespaced_service(name=name + "-service", namespace=namespace)
|
||||||
db = dmPython.connect(user='SYSDBA', password='SYSDBA', host=service.spec.cluster_ip, port="5236")
|
print(service.spec.cluster_ip)
|
||||||
|
db = dmPython.connect(user='SYSDBA', password='SYSDBA', host=service.spec.cluster_ip)
|
||||||
cursor = db.cursor()
|
cursor = db.cursor()
|
||||||
records = cursor.execute("SELECT * FROM V$VERSION").fetchall()
|
records = cursor.execute("SELECT * FROM V$VERSION").fetchall()
|
||||||
for record in records:
|
for record in records:
|
||||||
|
|
|
@ -291,8 +291,8 @@ def SendLink():
|
||||||
Link = 'http://36.138.114.105:' + str(j['ports'][0]['node_port'])
|
Link = 'http://36.138.114.105:' + str(j['ports'][0]['node_port'])
|
||||||
Link2 = 'http://36.138.114.105:' + str(j['ports'][1]['node_port'])
|
Link2 = 'http://36.138.114.105:' + str(j['ports'][1]['node_port'])
|
||||||
Link3 = 'http://36.138.114.105:' + str(j['ports'][2]['node_port'])
|
Link3 = 'http://36.138.114.105:' + str(j['ports'][2]['node_port'])
|
||||||
cursor.execute(f"INSERT INTO TRAINSCORE VALUES (?,?,?,?,?,?,?,?,?)",(
|
cursor.execute(f"INSERT INTO TRAINSCORE VALUES (?,?,?,?,?,?,?,?,?,?)",(
|
||||||
i,i[0:6],testID,'false','NULL','NULL',Link,Link2,Link3
|
i,i[0:6],testID,'false','NULL','NULL',Link,Link2,Link3,'NULL'
|
||||||
))
|
))
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
|
@ -304,8 +304,8 @@ def SendLink():
|
||||||
for j in item['list']:
|
for j in item['list']:
|
||||||
if j['name'] == name + '-service':
|
if j['name'] == name + '-service':
|
||||||
Link = j['ip']
|
Link = j['ip']
|
||||||
cursor.execute(f"INSERT INTO TRAINSCORE VALUES (?,?,?,?,?,?,?,?,?)", (
|
cursor.execute(f"INSERT INTO TRAINSCORE VALUES (?,?,?,?,?,?,?,?,?,?)", (
|
||||||
i, i[0:6], testID, 'false', 'NULL', 'NULL', Link, 'NULL', 'NULL'
|
i, i[0:6], testID, 'false', 'NULL', 'NULL', Link, 'NULL', 'NULL','NULL'
|
||||||
))
|
))
|
||||||
|
|
||||||
print('加入链接成功')
|
print('加入链接成功')
|
||||||
|
|
Loading…
Reference in New Issue