fix nil map assignment in gc handler (#14918)

Signed-off-by: Eike David Lenz <e.lenz@mittwald.de>
This commit is contained in:
Eike David Lenz 2021-05-26 04:46:11 +02:00 committed by GitHub
parent 80541126e6
commit a3e27ebb87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,6 +63,9 @@ func (g *gcAPI) UpdateGCSchedule(ctx context.Context, params operation.UpdateGCS
}
func (g *gcAPI) kick(ctx context.Context, scheType string, cron string, parameters map[string]interface{}) (int64, error) {
if parameters == nil {
parameters = make(map[string]interface{})
}
// set the required parameters for GC
parameters["redis_url_reg"] = os.Getenv("_REDIS_URL_REG")
parameters["time_window"] = config.GetGCTimeWindow()