can connect to nodejs and python
This commit is contained in:
parent
f1f25125ae
commit
f20372bc2b
@ -5,7 +5,7 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
IS_DOCKER_COMPOSE: '1'
|
IS_DOCKER_COMPOSE: '1'
|
||||||
ports:
|
ports:
|
||||||
- '80:4005'
|
- '8080:8080'
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app/dtm
|
- .:/app/dtm
|
||||||
mysql:
|
mysql:
|
||||||
|
|||||||
@ -27,9 +27,9 @@ func CronTransOnce(expireIn time.Duration, status string) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func CronCommitted() {
|
func CronSubmitted() {
|
||||||
for {
|
for {
|
||||||
notEmpty := CronTransOnce(time.Duration(0), "commitetd")
|
notEmpty := CronTransOnce(time.Duration(0), "submitted")
|
||||||
if !notEmpty {
|
if !notEmpty {
|
||||||
sleepCronTime()
|
sleepCronTime()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,7 @@ var dtmsvrPort = 8080
|
|||||||
|
|
||||||
func MainStart() {
|
func MainStart() {
|
||||||
StartSvr()
|
StartSvr()
|
||||||
go CronCommitted()
|
go CronSubmitted()
|
||||||
go CronPrepared()
|
go CronPrepared()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ func (t *TransTccProcessor) GenBranches() []TransBranch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *TransTccProcessor) ExecBranch(db *common.DB, branch *TransBranch) {
|
func (t *TransTccProcessor) ExecBranch(db *common.DB, branch *TransBranch) {
|
||||||
resp, err := common.RestyClient.R().SetBody(branch.Data).SetQueryParams(t.getBranchParams(branch)).Post(branch.Url)
|
resp, err := common.RestyClient.R().SetBody(branch.Data).SetHeader("Content-type", "application/json").SetQueryParams(t.getBranchParams(branch)).Post(branch.Url)
|
||||||
e2p(err)
|
e2p(err)
|
||||||
body := resp.String()
|
body := resp.String()
|
||||||
if strings.Contains(body, "SUCCESS") {
|
if strings.Contains(body, "SUCCESS") {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user