mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 19:44:21 +00:00
16 lines
274 B
Go
16 lines
274 B
Go
|
package authz
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
//TODO: workaround if org projection is not yet up-to-date
|
||
|
func retry(retriable func() error) (err error) {
|
||
|
for i := 0; i < 3; i++ {
|
||
|
time.Sleep(500 * time.Millisecond)
|
||
|
err = retriable()
|
||
|
if err == nil {
|
||
|
return nil
|
||
|
}
|
||
|
}
|
||
|
return err
|
||
|
}
|