storeEntityWorker creates a worker for the entity and stores it. The retry loop will start it.
(entity params.ForgeEntity)
| 121 | // storeEntityWorker creates a worker for the entity and stores it. |
| 122 | // The retry loop will start it. |
| 123 | func (c *Controller) storeEntityWorker(entity params.ForgeEntity) { |
| 124 | worker, err := NewWorker(c.ctx, c.store, entity, c.providers) |
| 125 | if err != nil { |
| 126 | slog.ErrorContext(c.ctx, "creating worker", "entity_id", entity.ID, "error", err) |
| 127 | return |
| 128 | } |
| 129 | c.Entities.Store(entity.ID, worker) |
| 130 | } |
| 131 | |
| 132 | func (c *Controller) Start() error { |
| 133 | c.mux.Lock() |
no test coverage detected