diff --git a/cloud/disk_manager/internal/pkg/dataplane/register.go b/cloud/disk_manager/internal/pkg/dataplane/register.go index 380e4ab42e..8aca165201 100644 --- a/cloud/disk_manager/internal/pkg/dataplane/register.go +++ b/cloud/disk_manager/internal/pkg/dataplane/register.go @@ -90,7 +90,7 @@ func RegisterForExecution( } if migrationDestinationStorage != nil { - err = taskRegistry.Register("dataplane.MigrateSnapshotToAnotherDatabaseTask", func() tasks.Task { + err = taskRegistry.RegisterForExecution("dataplane.MigrateSnapshotToAnotherDatabaseTask", func() tasks.Task { return &migrateSnapshotToAnotherDatabaseTask{ sourceStorage: storage, destinationStorage: migrationDestinationStorage, diff --git a/cloud/disk_manager/pkg/admin/snapshots.go b/cloud/disk_manager/pkg/admin/snapshots.go index fe02ccdc40..b1069d99a9 100644 --- a/cloud/disk_manager/pkg/admin/snapshots.go +++ b/cloud/disk_manager/pkg/admin/snapshots.go @@ -278,7 +278,8 @@ func (c *scheduleCreateSnapshotFromLegacySnapshotTask) run() error { logging.Info(ctx, "Creating task scheduler") taskRegistry := tasks.NewRegistry() - *(c.serverConfig.TasksConfig).RegularSystemTasksEnabled = false + regularSystemTasksEnabled := false + c.serverConfig.TasksConfig.RegularSystemTasksEnabled = ®ularSystemTasksEnabled taskScheduler, err := tasks.NewScheduler( ctx, taskRegistry, @@ -362,7 +363,8 @@ func (c *scheduleMigrateSnapshotToAnotherDatabaseTaskCmd) run() error { logging.Info(ctx, "Creating task scheduler") taskRegistry := tasks.NewRegistry() - *(c.serverConfig.TasksConfig).RegularSystemTasksEnabled = false + regularSystemTasksEnabled := false + c.serverConfig.TasksConfig.RegularSystemTasksEnabled = ®ularSystemTasksEnabled taskScheduler, err := tasks.NewScheduler( ctx, taskRegistry,