Worker Use UUID from Config
This commit is contained in:
parent
a040d5d56c
commit
0155c36af1
1 changed files with 8 additions and 1 deletions
|
@ -26,8 +26,15 @@ var rpcServer = rpc.NewServer()
|
|||
func Start(_conf config.Config) {
|
||||
conf = _conf
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
uuid := uuid.New()
|
||||
// TODO Generate and Save a ID if the Config has none
|
||||
//uuid := uuid.New()
|
||||
uuid, err := uuid.Parse(conf.Worker.ID)
|
||||
if err != nil {
|
||||
slog.Error("Cannot Parse ID", "err", err)
|
||||
return
|
||||
}
|
||||
|
||||
sigs := make(chan os.Signal, 1)
|
||||
signal.Notify(sigs, os.Interrupt)
|
||||
|
|
Loading…
Add table
Reference in a new issue