65 lines
1.1 KiB
Go
65 lines
1.1 KiB
Go
package task
|
|
|
|
import (
|
|
//"fmt"
|
|
"f5"
|
|
"sync"
|
|
"main/task/spec_transfer721"
|
|
)
|
|
|
|
type taskMgr struct {
|
|
//HourlyTaskMgr
|
|
//DailyTaskMgr
|
|
webHook
|
|
goldBullionReturn
|
|
spec_transfer721.SpecTransfer721
|
|
repairNft
|
|
openGoldLock sync.Mutex
|
|
sysMail
|
|
repairOrder
|
|
refreshMeta
|
|
nftLock
|
|
}
|
|
|
|
func (this *taskMgr) Init() {
|
|
if f5.IsOnlineEnv() {
|
|
this.nftLock.init()
|
|
this.refreshMeta.init()
|
|
return
|
|
}
|
|
//t.HourlyTaskMgr.Init()
|
|
//t.DailyTaskMgr.Init()
|
|
this.webHook.init()
|
|
this.goldBullionReturn.init()
|
|
this.SpecTransfer721.Init()
|
|
this.repairNft.init()
|
|
this.sysMail.init()
|
|
this.repairOrder.init()
|
|
this.refreshMeta.init()
|
|
this.nftLock.init()
|
|
}
|
|
|
|
func (this *taskMgr) UnInit() {
|
|
if f5.IsOnlineEnv() {
|
|
this.nftLock.unInit()
|
|
this.refreshMeta.unInit()
|
|
return
|
|
}
|
|
this.nftLock.unInit()
|
|
this.refreshMeta.unInit()
|
|
this.repairOrder.unInit()
|
|
this.sysMail.unInit()
|
|
this.repairNft.unInit()
|
|
this.SpecTransfer721.UnInit()
|
|
this.goldBullionReturn.unInit()
|
|
this.webHook.unInit()
|
|
}
|
|
|
|
func (this *taskMgr) LockOpenGodBullion() {
|
|
this.openGoldLock.Lock()
|
|
}
|
|
|
|
func (this *taskMgr) UnLockOpenGodBullion() {
|
|
this.openGoldLock.Unlock()
|
|
}
|