mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:17:32 +00:00
use global id generator (#142)
* use global id generator * remove duplicate `UserRemoved` Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
@@ -3,8 +3,7 @@ package spooler
|
||||
import (
|
||||
"github.com/caos/logging"
|
||||
"github.com/caos/zitadel/internal/eventstore"
|
||||
"github.com/sony/sonyflake"
|
||||
"strconv"
|
||||
"github.com/caos/zitadel/internal/id"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
@@ -15,12 +14,12 @@ type Config struct {
|
||||
}
|
||||
|
||||
func (c *Config) New() *Spooler {
|
||||
lockID, err := sonyflake.NewSonyflake(sonyflake.Settings{}).NextID()
|
||||
lockID, err := id.SonyFlakeGenerator.Next()
|
||||
logging.Log("SPOOL-bdO56").OnError(err).Panic("unable to generate lockID")
|
||||
|
||||
return &Spooler{
|
||||
handlers: c.ViewHandlers,
|
||||
lockID: strconv.FormatUint(lockID, 10),
|
||||
lockID: lockID,
|
||||
eventstore: c.Eventstore,
|
||||
locker: c.Locker,
|
||||
queue: make(chan *spooledHandler),
|
||||
|
Reference in New Issue
Block a user