mirror of
https://github.com/safing/portbase
synced 2025-09-01 18:19:57 +00:00
Use new microtask function in api module
This commit is contained in:
parent
aabd4fef77
commit
01c4fc75da
1 changed files with 1 additions and 2 deletions
|
@ -433,8 +433,7 @@ func updateAPIKeys(_ context.Context, _ interface{}) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if hasExpiredKeys {
|
if hasExpiredKeys {
|
||||||
name := "api-key-cleanup"
|
module.StartLowPriorityMicroTask("api key cleanup", 0, func(ctx context.Context) error {
|
||||||
module.StartLowPriorityMicroTask(&name, func(ctx context.Context) error {
|
|
||||||
if err := config.SetConfigOption(CfgAPIKeys, validAPIKeys); err != nil {
|
if err := config.SetConfigOption(CfgAPIKeys, validAPIKeys); err != nil {
|
||||||
log.Errorf("api: failed to remove expired API keys: %s", err)
|
log.Errorf("api: failed to remove expired API keys: %s", err)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue