activity.go ×6

Frontier kind: Code frontier

unlabeled · c_5ed7f0a67030

2 tests · 4825 LOC · 198 files · introduces 0 tests · 19 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges19 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
790 ranges4825 lines · 198 files · Browse complete extent
All tests (intent)
2 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.

2 files ranked by introduced lines: 19 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/workflow/activity.go 14 introduced LOC · 6 ranges

Open complete file

288 resetOptions bool,
289 jitter time.Duration,
290 > ) error { activity.go
291 > if !mutableState.IsWorkflowExecutionRunning() {
292 return consts.ErrWorkflowCompleted
293 }
294 > ai, activityFound := mutableState.GetActivityByActivityID(activityId) activity.go
295 >
296 > if !activityFound {
297 return consts.ErrActivityNotFound
298 }
299
300 > var originalOptions *historypb.ActivityTaskScheduledEventAttributes activity.go
301 > if resetOptions {
302 event, err := mutableState.GetActivityScheduledEvent(ctx, ai.ScheduledEventId)
303 if err != nil {
315 }
316
317 > return mutableState.UpdateActivity(ai.ScheduledEventId, func(activityInfo *persistencespb.ActivityInfo, ms historyi.MutableState) error { activity.go
318 > // reset the number of attempts
319 > activityInfo.Attempt = 1
320 > activityInfo.ActivityReset = true
321 > if resetHeartbeats {
322 activityInfo.ResetHeartbeats = true
323 }
324
325 > if resetOptions { activity.go
326 // update activity info with new options
327 activityInfo.TaskQueue = originalOptions.TaskQueue.Name
343
344 // if activity is running, or it is paused and we don't want to unpause - we don't need to do anything
345 > if GetActivityState(ai) == enumspb.PENDING_ACTIVITY_STATE_STARTED || (ai.Paused && keepPaused) { activity.go
346 return nil
347 }
go.temporal.io/server/api/persistence/v1/executions.pb.go 5 introduced LOC · 1 range

Open complete file

4592 }
4593
4594 > func (x *ActivityInfo_PauseInfo) GetManual() *ActivityInfo_PauseInfo_Manual { executions.pb.go
4595 > if x != nil {
4596 > if x, ok := x.PausedBy.(*ActivityInfo_PauseInfo_Manual_); ok {
4597 > return x.Manual
4598 > }
4599 }
4600 return nil