mirror of https://github.com/dtm-labs/dtm.git
csharpjavadistributed-transactionsdtmgogolangmicroservicenodejsphpdatabasesagaseatatcctransactiontransactionsxapythondistributed
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
729 B
38 lines
729 B
package test
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/yedf/dtm/common"
|
|
"github.com/yedf/dtm/dtmcli"
|
|
"github.com/yedf/dtm/dtmsvr"
|
|
)
|
|
|
|
var config = common.DtmConfig
|
|
|
|
func dbGet() *common.DB {
|
|
return common.DbGet(config.DB)
|
|
}
|
|
|
|
// WaitTransProcessed alias
|
|
var WaitTransProcessed = dtmsvr.WaitTransProcessed
|
|
|
|
// CronTransOnce alias
|
|
var CronTransOnce = dtmsvr.CronTransOnce
|
|
var e2p = dtmcli.E2P
|
|
|
|
// TransGlobal alias
|
|
type TransGlobal = dtmsvr.TransGlobal
|
|
|
|
// TransBranch alias
|
|
type TransBranch = dtmsvr.TransBranch
|
|
|
|
// M alias
|
|
type M = dtmcli.M
|
|
|
|
func cronTransOnceForwardNow(seconds int) {
|
|
old := dtmsvr.NowForwardDuration
|
|
dtmsvr.NowForwardDuration = time.Duration(seconds) * time.Second
|
|
CronTransOnce()
|
|
dtmsvr.NowForwardDuration = old
|
|
}
|
|
|