Worker Use UUID from Config

This commit is contained in:
Samuel Lorch 2024-05-09 04:41:57 +02:00
parent a040d5d56c
commit 0155c36af1

View file

@ -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)