Files
crawlab/backend/apps/worker.go
2021-04-29 10:44:46 +08:00

29 lines
413 B
Go

package apps
import (
"github.com/apex/log"
"github.com/crawlab-team/crawlab-core/grpc"
)
type Worker struct {
handler *Handler
}
func (app *Worker) Init() {
_ = initModule("grpc", grpc.InitGrpcServices)
}
func (app *Worker) Run() {
log.Info("worker has started")
}
func (app *Worker) Stop() {
log.Info("worker has stopped")
}
func NewWorker() *Worker {
return &Worker{
handler: NewHandler(),
}
}