* WIP

* Added rebuild channels index functionality

* Added rough logic to send message to all sysadmins

* WIP

* WIP

* WIP

* Cleanup

* i18n fix

* reading through all pages of system admins

* Fixed webapp style

* i18n fix

* Added help text

* i18n fix

* i18n update

* Updated system console button action

* Updated snapshots

* some cleanup

* Updated snapshot

* Update server/channels/app/server.go

Co-authored-by: Daniel Espino García <larkox@gmail.com>

* fixed typo

* Refactoring to improve readibility

* moved index check to API later during config update

* Added some docs

* Updated get system bot

---------

Co-authored-by: Daniel Espino García <larkox@gmail.com>
Этот коммит содержится в:
Harshil Sharma
2024-03-13 10:26:06 +05:30
коммит произвёл GitHub
родитель ccc00b9077
Коммит 774df37464
28 изменённых файлов: 493 добавлений и 117 удалений

Просмотреть файл

@@ -7,10 +7,20 @@ import (
"time"
)
var backoffTimeouts = []time.Duration{50 * time.Millisecond, 100 * time.Millisecond, 200 * time.Millisecond, 200 * time.Millisecond, 400 * time.Millisecond, 400 * time.Millisecond}
var shortBackoffTimeouts = []time.Duration{50 * time.Millisecond, 100 * time.Millisecond, 200 * time.Millisecond, 200 * time.Millisecond, 400 * time.Millisecond, 400 * time.Millisecond}
var longBackoffTimeouts = []time.Duration{500 * time.Millisecond, 1 * time.Second, 2 * time.Second, 5 * time.Second, 8 * time.Second, 10 * time.Second}
// ProgressiveRetry executes a BackoffOperation and waits an increasing time before retrying the operation.
func ProgressiveRetry(operation func() error) error {
return CustomProgressiveRetry(operation, shortBackoffTimeouts)
}
func LongProgressiveRetry(operation func() error) error {
return CustomProgressiveRetry(operation, longBackoffTimeouts)
}
func CustomProgressiveRetry(operation func() error, backoffTimeouts []time.Duration) error {
var err error
for attempts := 0; attempts < len(backoffTimeouts); attempts++ {