page timeout added
This commit is contained in:
parent
56309cafb9
commit
f466566505
3 changed files with 17 additions and 9 deletions
|
|
@ -75,9 +75,6 @@ func (app *App) Run(ctx context.Context) {
|
|||
//main
|
||||
apiClient := newApiClient(app.config.GrpcCfg.ApiClientHost + ":" + app.config.GrpcCfg.ApiClientPort)
|
||||
|
||||
period := time.NewTicker(app.checkPeriod * time.Hour)
|
||||
defer period.Stop()
|
||||
|
||||
sender := make(chan shared.TaskResult, app.numCPUs*10)
|
||||
defer close(sender)
|
||||
|
||||
|
|
@ -96,6 +93,7 @@ func (app *App) Run(ctx context.Context) {
|
|||
Enabled: app.config.OriginEnabled.Mandarake,
|
||||
ExternalBrowser: app.config.ExternalBrowser,
|
||||
GoroutinesNumber: app.numCPUs,
|
||||
TaskTimeout: app.config.TasksCfg.TaskTimeout,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -117,6 +115,9 @@ func (app *App) Run(ctx context.Context) {
|
|||
taskProcessor.StartWork(ctx, receivedTasks)
|
||||
}
|
||||
|
||||
period := time.NewTicker(app.checkPeriod * time.Hour)
|
||||
defer period.Stop()
|
||||
|
||||
go func() {
|
||||
process() //immediate start
|
||||
for range period.C {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue