fix: upstream renterd updates
This commit is contained in:
parent
a3cfebab30
commit
5ad91ad263
|
@ -39,8 +39,8 @@ type WorkerConfig struct {
|
|||
SessionTTL time.Duration
|
||||
DownloadSectorTimeout time.Duration
|
||||
UploadSectorTimeout time.Duration
|
||||
DownloadMaxOverdrive int
|
||||
UploadMaxOverdrive int
|
||||
DownloadMaxOverdrive uint64
|
||||
UploadMaxOverdrive uint64
|
||||
}
|
||||
|
||||
type BusConfig struct {
|
||||
|
@ -284,7 +284,11 @@ func NewBus(cfg BusConfig, dir string, seed types.PrivateKey, l *zap.Logger) (ht
|
|||
|
||||
func NewWorker(cfg WorkerConfig, b worker.Bus, seed types.PrivateKey, l *zap.Logger) (http.Handler, ShutdownFn, error) {
|
||||
workerKey := blake2b.Sum256(append([]byte("worker"), seed...))
|
||||
w := worker.New(workerKey, cfg.ID, b, cfg.ContractLockTimeout, cfg.SessionLockTimeout, cfg.SessionReconnectTimeout, cfg.SessionTTL, cfg.BusFlushInterval, cfg.DownloadSectorTimeout, cfg.UploadSectorTimeout, cfg.DownloadMaxOverdrive, cfg.UploadMaxOverdrive, l)
|
||||
w, err := worker.New(workerKey, cfg.ID, b, cfg.ContractLockTimeout, cfg.SessionLockTimeout, cfg.SessionReconnectTimeout, cfg.SessionTTL, cfg.BusFlushInterval, cfg.DownloadSectorTimeout, cfg.UploadSectorTimeout, cfg.DownloadMaxOverdrive, cfg.UploadMaxOverdrive, l)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
return w.Handler(), w.Shutdown, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue