feat(GODT-2713): Send config_progress event once a day if the configuration is stucked in pending for more than a day.

This commit is contained in:
Romain LE JEUNE
2023-06-27 20:16:31 +02:00
committed by Romain Le Jeune
parent 68334e3bb8
commit 098eb7cb7a
4 changed files with 77 additions and 1 deletions

View File

@ -98,6 +98,8 @@ type User struct {
configStatus *configstatus.ConfigurationStatus
telemetryManager telemetry.Availability
// goStatusProgress triggers a check/sending if progress is needed.
goStatusProgress func()
}
// New returns a new user.
@ -176,6 +178,12 @@ func New(
telemetryManager: telemetryManager,
}
// Check for status_progress when triggered.
user.goStatusProgress = user.tasks.PeriodicOrTrigger(configstatus.ProgressCheckInterval, 0, func(ctx context.Context) {
user.SendConfigStatusProgress()
})
defer user.goStatusProgress()
// Initialize the user's update channels for its current address mode.
user.initUpdateCh(encVault.AddressMode())