mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-14 20:08:02 +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
|
||
|
}
|