commands.go ×6

Frontier kind: Code frontier

unlabeled · c_1b3d63bc449f

21 tests · 3488 LOC · 147 files · introduces 0 tests · 33 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges33 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
665 ranges3488 lines · 147 files · Browse complete extent
All tests (intent)
21 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 33 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/components/nexusoperations/workflow/commands.go 33 introduced LOC · 6 ranges

Open complete file

181 }
182
183 > root := ms.HSM() commands.go
184 > coll := nexusoperations.MachineCollection(root)
185 > maxPendingOperations := ch.config.MaxConcurrentOperations(nsName)
186 > if coll.Size() >= ch.config.MaxConcurrentOperations(nsName) {
187 return chasmworkflow.FailWorkflowTaskError{
188 Cause: enumspb.WORKFLOW_TASK_FAILED_CAUSE_PENDING_NEXUS_OPERATIONS_LIMIT_EXCEEDED,
192
193 // Trim timeout to workflow run timeout.
194 > runTimeout := ms.GetExecutionInfo().WorkflowRunTimeout.AsDuration() commands.go
195 > opTimeout := attrs.ScheduleToCloseTimeout.AsDuration()
196 > if runTimeout > 0 && (opTimeout == 0 || opTimeout > runTimeout) {
197 attrs.ScheduleToCloseTimeout = ms.GetExecutionInfo().WorkflowRunTimeout
198 opTimeout = attrs.ScheduleToCloseTimeout.AsDuration()
200
201 // Trim timeout to max allowed timeout.
202 > if maxTimeout := ch.config.MaxOperationScheduleToCloseTimeout(nsName); maxTimeout > 0 && opTimeout > maxTimeout { commands.go
203 attrs.ScheduleToCloseTimeout = durationpb.New(maxTimeout)
204 }
205
206 // Trim secondary timeouts to the primary timeout.
207 > scheduleToCloseTimeout := attrs.ScheduleToCloseTimeout.AsDuration() commands.go
208 > scheduleToStartTimeout := attrs.ScheduleToStartTimeout.AsDuration()
209 > startToCloseTimeout := attrs.StartToCloseTimeout.AsDuration()
210 >
211 > if scheduleToCloseTimeout > 0 {
212 if scheduleToStartTimeout > scheduleToCloseTimeout {
213 attrs.ScheduleToStartTimeout = attrs.ScheduleToCloseTimeout
218 }
219
220 > event := ms.AddHistoryEvent(enumspb.EVENT_TYPE_NEXUS_OPERATION_SCHEDULED, func(he *historypb.HistoryEvent) { commands.go
221 > he.Attributes = &historypb.HistoryEvent_NexusOperationScheduledEventAttributes{
222 > NexusOperationScheduledEventAttributes: &historypb.NexusOperationScheduledEventAttributes{
223 > Endpoint: attrs.Endpoint,
224 > EndpointId: endpointID,
225 > Service: attrs.Service,
226 > Operation: attrs.Operation,
227 > Input: attrs.Input,
228 > ScheduleToCloseTimeout: attrs.ScheduleToCloseTimeout,
229 > ScheduleToStartTimeout: attrs.ScheduleToStartTimeout,
230 > StartToCloseTimeout: attrs.StartToCloseTimeout,
231 > NexusHeader: lowerCaseHeader,
232 > RequestId: requestID,
233 > WorkflowTaskCompletedEventId: workflowTaskCompletedEventID,
234 > },
235 > }
236 > he.UserMetadata = command.UserMetadata
237 > he.EventGroupMarkers = command.EventGroupMarkers
238 > })
239
240 > return nexusoperations.ScheduledEventDefinition{}.Apply(root, event) commands.go
241 }
242