Skip to content

Commit

Permalink
review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ettec committed Nov 26, 2024
1 parent c310917 commit 74e8208
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/services/workflows/syncer/workflow_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ type WorkflowRegistryEventResponse struct {

// WorkflowEventPollerConfig is the configuration needed to poll for events on a contract. Currently
// requires the ContractEventName.
//
// TODO(mstreet3): Use LookbackBlocks instead of StartBlockNum
type WorkflowEventPollerConfig struct {
QueryCount uint64
}
Expand Down Expand Up @@ -284,7 +282,7 @@ func (w *workflowRegistry) loadWorkflows(ctx context.Context) (*types.Head, erro
// and one for handling the events.
func (w *workflowRegistry) Start(ctx context.Context) error {
return w.StartOnce(w.Name(), func() error {
head, err := w.loadWorkflows(ctx)
loadWorkflowsHead, err := w.loadWorkflows(ctx)
if err != nil {
return fmt.Errorf("failed to load workflows: %w", err)
}
Expand All @@ -296,7 +294,7 @@ func (w *workflowRegistry) Start(ctx context.Context) error {
defer w.wg.Done()
defer cancel()

w.syncEventsLoop(ctx, head.Height)
w.syncEventsLoop(ctx, loadWorkflowsHead.Height)
}()

w.wg.Add(1)
Expand Down

0 comments on commit 74e8208

Please sign in to comment.