worker/server
This commit is contained in:
parent
614806c52d
commit
f2745bf156
|
@ -9,7 +9,8 @@ RUN export GOROOT=/usr/local/go1.21.4 && \
|
|||
export GOPRIVATE=gitlab.batiao8.com && \
|
||||
export PATH=$PATH:$GOROOT/bin && \
|
||||
go mod tidy && \
|
||||
go build cmd/enterprise.go && \
|
||||
go build cmd/worker/worker.go && \
|
||||
go build cmd/server/server.go && \
|
||||
mv enterprise /app/bin && \
|
||||
cp -r conf /app && \
|
||||
cp start.sh /app && \
|
||||
|
|
|
@ -5,7 +5,6 @@ import (
|
|||
"enterprise/common/global"
|
||||
"enterprise/server"
|
||||
_ "enterprise/service/salary_calculator"
|
||||
"enterprise/worker"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -13,8 +12,6 @@ func main() {
|
|||
config.LoadAliPay()
|
||||
global.InitGlobal()
|
||||
|
||||
worker.InitCorp()
|
||||
|
||||
if err := server.Start(); err != nil {
|
||||
panic(err)
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"enterprise/common/config"
|
||||
"enterprise/common/global"
|
||||
_ "enterprise/service/salary_calculator"
|
||||
"enterprise/worker"
|
||||
)
|
||||
|
||||
func main() {
|
||||
config.LoadServerConfig()
|
||||
config.LoadAliPay()
|
||||
global.InitGlobal()
|
||||
|
||||
worker.InitCorp()
|
||||
select {}
|
||||
}
|
Loading…
Reference in New Issue