Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qaHome
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qaHome
Commits
250d1a5a
Commit
250d1a5a
authored
Apr 20, 2018
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ok
parent
ff20ceb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
server.js
app/qa-home/controller/dbconfig/server.js
+7
-5
No files found.
app/qa-home/controller/dbconfig/server.js
View file @
250d1a5a
...
...
@@ -4,7 +4,9 @@ var cproc = require('child_process')
var
execSync
=
cproc
.
execSync
var
jenkinsapi
=
require
(
'
jenkins-api
'
)
var
jenkins
=
jenkinsapi
.
init
(
"
http://qahome:qahome@192.168.4.2:8080/
"
)
var
jenkins_user_pwd
=
'
http://yong.zhi:Lianghuapai233@
'
var
jenkins
=
jenkinsapi
.
init
(
jenkins_user_pwd
+
"
192.168.4.96:8080/
"
)
// var jenkins = jenkinsapi.init("http://qahome:qahome@192.168.4.2:8080/")
var
eos_host
=
'
eos.quantgroups.com
'
let
default_username
=
'
xyqb_query
'
...
...
@@ -334,8 +336,8 @@ exports.db_sync_query = async function () {
return
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
ms
))
}
api_json
=
await
requestPromise
(
req
.
location
+
"
api/json
"
)
console
.
log
(
22
,
api_json
)
api_json
=
await
requestPromise
(
jenkins_user_pwd
+
req
.
location
.
replace
(
'
http://
'
,
''
)
+
"
api/json
"
)
// api_json = await requestPromise(req.location.replace('http://', '') + "api/json"
)
if
(
typeof
api_json
==
'
string
'
)
{
if
(
api_json
.
indexOf
(
"
number
"
)
>
0
)
{
...
...
@@ -352,9 +354,9 @@ exports.db_sync_query = async function () {
this
.
body
=
{
code
:
"
0001
"
,
msg
:
{
status
:
"
queue
"
,
building
:
true
},
log
:
{
body
:
""
}
}
}
}
else
{
console
.
log
(
"
获取队列信息出错
"
,
req
.
location
)
console
.
log
(
api_json
)
console
.
log
(
typeof
api_json
)
this
.
body
=
{
code
:
"
0002
"
,
msg
:
api_json
}
this
.
body
=
{
code
:
"
0002
"
,
msg
:
"
获取队列信息出错
"
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment