pass storage an empty context so it can close cleanly (#3653)
Co-authored-by: Danielle Miu <29378233+DanielleMiu@users.noreply.github.com>
This commit is contained in:
1 parent
a7c1876d7b
commit
9413837b6a
1 file changed
+2
-1
@@ -257,7 +257,8 @@ func New(ctx context.Context, conf *Config) (*Worker, error) {
|
||||
}
|
||||
}
|
||||
|
||||
s, err := recordingStorageFactory(ctx, w.conf.RawConfig.Worker.RecordingStoragePath, plgClients, enableStorageLoopback)
|
||||
// passing in an empty context so that storage can finish syncing during an emergency shutdown or interrupt
|
||||
s, err := recordingStorageFactory(context.Background(), w.conf.RawConfig.Worker.RecordingStoragePath, plgClients, enableStorageLoopback)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error create recording storage: %w", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user