Skip to content

Commit

Permalink
Merge branch 'develop' into feature/KS-354-streams-agg-test
Browse files Browse the repository at this point in the history
  • Loading branch information
bolekk authored Jun 27, 2024
2 parents 6cad6cc + 7a3ba8e commit 6383998
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
5 changes: 1 addition & 4 deletions contracts/src/v0.8/keystone/CapabilitiesRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1010,10 +1010,7 @@ contract CapabilitiesRegistry is OwnerIsCreator, TypeAndVersionInterface {
/// beforeCapabilityConfigSet
if (
capability.configurationContract.code.length == 0 ||
!IERC165(capability.configurationContract).supportsInterface(
ICapabilityConfiguration.getCapabilityConfiguration.selector ^
ICapabilityConfiguration.beforeCapabilityConfigSet.selector
)
!IERC165(capability.configurationContract).supportsInterface(type(ICapabilityConfiguration).interfaceId)
) revert InvalidCapabilityConfigurationContractInterface(capability.configurationContract);
}
s_capabilities[hashedCapabilityId] = capability;
Expand Down
20 changes: 18 additions & 2 deletions core/services/workflows/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,25 @@ func (e *Engine) registerTrigger(ctx context.Context, t *triggerCapability, trig
}}
}

e.wg.Add(1)
go func() {
for event := range eventsCh {
e.triggerEvents <- event
defer e.wg.Done()

for {
select {
case <-e.stopCh:
return
case event, isOpen := <-eventsCh:
if !isOpen {
return
}

select {
case <-e.stopCh:
return
case e.triggerEvents <- event:
}
}
}
}()

Expand Down

0 comments on commit 6383998

Please sign in to comment.