Compare commits
3 Commits
f0958a340f
...
0fa8d88479
| Author | SHA1 | Date | |
|---|---|---|---|
|
0fa8d88479
|
|||
|
9eef81d1a5
|
|||
|
6821924c8e
|
@@ -710,6 +710,31 @@ SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
go.etcd.io/bbolt
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 Ben Johnson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
go.uber.org/multierr
|
||||
|
||||
Copyright (c) 2017-2021 Uber Technologies, Inc.
|
||||
@@ -773,13 +798,13 @@ starting in 2011 when the project was ported over:
|
||||
- internal/libyaml/yaml.go
|
||||
- internal/libyaml/yamlprivate.go
|
||||
|
||||
Copyright 2006-2011 - Kirill Simonov
|
||||
Copyright 2006-2010 Kirill Simonov
|
||||
https://opensource.org/license/mit
|
||||
|
||||
All the remaining project files are covered by the Apache license:
|
||||
|
||||
Copyright 2011-2019 - Canonical Ltd
|
||||
Copyright 2025 - The go-yaml Project Contributors
|
||||
Copyright 2011-2019 Canonical Ltd
|
||||
Copyright 2025 The go-yaml Project Contributors
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
testing = true
|
||||
|
||||
###
|
||||
# Тестовый период, по истечении которого брандмауэр удалит правила и демон завершит работу.
|
||||
# Тестовый период, по истечении которого брандмауэр удалит правила, очистит другие данные и демон завершит работу.
|
||||
# Период указывается в минутах.
|
||||
# Мин: 1
|
||||
# Макс: 30000
|
||||
# По умолчанию: 5
|
||||
# ***
|
||||
# The test period after which the firewall will clear the rules and the daemon will shut down.
|
||||
# A test period after which the firewall will remove rules, clear other data, and the daemon will exit.
|
||||
# The period is specified in minutes.
|
||||
# Min: 1
|
||||
# Max: 30000
|
||||
|
||||
@@ -3,6 +3,7 @@ package daemon
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
@@ -105,6 +106,10 @@ func (d *daemon) runWorker(ctx context.Context, isTesting bool, testingInterval
|
||||
return
|
||||
case <-stopTestingCh:
|
||||
d.logger.Info("Testing interval expired, stopping service")
|
||||
err := d.notifications.DBQueueClear()
|
||||
if err != nil {
|
||||
d.logger.Error(fmt.Sprintf("failed to clear notifications queue: %v", err))
|
||||
}
|
||||
d.Stop()
|
||||
return
|
||||
case <-d.stopCh:
|
||||
|
||||
Reference in New Issue
Block a user