can connect to nodejs and python
This commit is contained in:
parent
f1f25125ae
commit
f20372bc2b
@ -5,7 +5,7 @@ services:
|
||||
environment:
|
||||
IS_DOCKER_COMPOSE: '1'
|
||||
ports:
|
||||
- '80:4005'
|
||||
- '8080:8080'
|
||||
volumes:
|
||||
- .:/app/dtm
|
||||
mysql:
|
||||
|
||||
@ -27,9 +27,9 @@ func CronTransOnce(expireIn time.Duration, status string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func CronCommitted() {
|
||||
func CronSubmitted() {
|
||||
for {
|
||||
notEmpty := CronTransOnce(time.Duration(0), "commitetd")
|
||||
notEmpty := CronTransOnce(time.Duration(0), "submitted")
|
||||
if !notEmpty {
|
||||
sleepCronTime()
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ var dtmsvrPort = 8080
|
||||
|
||||
func MainStart() {
|
||||
StartSvr()
|
||||
go CronCommitted()
|
||||
go CronSubmitted()
|
||||
go CronPrepared()
|
||||
}
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ func (t *TransTccProcessor) GenBranches() []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)
|
||||
body := resp.String()
|
||||
if strings.Contains(body, "SUCCESS") {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user