Skip to content

Commit

Permalink
Merge branch 'master' into selector-signal-loss
Browse files Browse the repository at this point in the history
  • Loading branch information
yuandrew authored Nov 15, 2024
2 parents 2c390ab + 9d74a90 commit 4d37fb8
Show file tree
Hide file tree
Showing 7 changed files with 1,007 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# We only want to check docker compose on a single target
testDockerCompose: true
- os: macos-intel
runsOn: macos-12
runsOn: macos-13
- os: macos-arm
runsOn: macos-14

Expand Down
4 changes: 3 additions & 1 deletion internal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ type (
// │ │ │ │ │
// │ │ │ │ │
// * * * * *
// Cannot be set the same time as a StartDelay or WithStartOperation.
CronSchedule string

// Memo - Optional non-indexed info that will be shown in list workflow.
Expand All @@ -712,6 +713,7 @@ type (
TypedSearchAttributes SearchAttributes

// EnableEagerStart - request eager execution for this workflow, if a local worker is available.
// Cannot be set the same time as a WithStartOperation.
//
// WARNING: Eager start does not respect worker versioning. An eagerly started workflow may run on
// any available local worker even if that worker is not in the default build ID set.
Expand All @@ -721,7 +723,7 @@ type (

// StartDelay - Time to wait before dispatching the first workflow task.
// A signal from signal with start will not trigger a workflow task.
// Cannot be set the same time as a CronSchedule.
// Cannot be set the same time as a CronSchedule or WithStartOperation.
StartDelay time.Duration

// StaticSummary - Single-line fixed summary for this workflow execution that will appear in UI/CLI. This can be
Expand Down
18 changes: 17 additions & 1 deletion internal/internal_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,22 @@ func (r *registry) getWorkflowDefinition(wt WorkflowType) (WorkflowDefinition, e
return newSyncWorkflowDefinition(executor), nil
}

func (r *registry) getNexusService(service string) *nexus.Service {
r.Lock()
defer r.Unlock()
return r.nexusServices[service]
}

func (r *registry) getRegisteredNexusServices() []*nexus.Service {
r.Lock()
defer r.Unlock()
result := make([]*nexus.Service, 0, len(r.nexusServices))
for _, s := range r.nexusServices {
result = append(result, s)
}
return result
}

// Validate function parameters.
func validateFnFormat(fnType reflect.Type, isWorkflow bool) error {
if fnType.Kind() != reflect.Func {
Expand Down Expand Up @@ -1058,7 +1074,7 @@ func (aw *AggregatedWorker) start() error {
return err
}
}
nexusServices := aw.registry.nexusServices
nexusServices := aw.registry.getRegisteredNexusServices()
if len(nexusServices) > 0 {
reg := nexus.NewServiceRegistry()
for _, service := range nexusServices {
Expand Down
Loading

0 comments on commit 4d37fb8

Please sign in to comment.