Skip to content

Commit

Permalink
max concurrent activitiy
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikvedvik committed Sep 14, 2023
1 parent 7e6db8e commit f87d657
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ func main() {
EnableSessionWorker: true,
Identity: identity,
LocalActivityWorkerOnly: false,
MaxConcurrentActivityExecutionSize: 100, // Doesn't make sense to have more than one activity running at a time
MaxConcurrentActivityExecutionSize: 5, // Doesn't make sense to have more than one activity running at a time
}

if utils.GetQueue() == utils.GetTranscodeQueue() {
workerOptions.MaxConcurrentActivityExecutionSize = 1
}

w := worker.New(c, utils.GetQueue(), workerOptions)
Expand Down Expand Up @@ -123,6 +127,7 @@ func main() {
w.RegisterWorkflow(wf)
}
case common.QueueTranscode:

for _, a := range transcodeActivities {
w.RegisterActivity(a)
}
Expand Down

0 comments on commit f87d657

Please sign in to comment.