File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
libraries/operation-graph/src Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -447,6 +447,7 @@ function _getOrCreatePhaseOperation(
447
447
// Only create the operation. Dependencies are hooked up separately
448
448
operation = new Operation ( {
449
449
groupName : phase . phaseName ,
450
+ name : `${ phase . phaseName } phase` ,
450
451
runner : new PhaseOperationRunner ( { phase, internalHeftSession } )
451
452
} ) ;
452
453
operations . set ( key , operation ) ;
@@ -466,6 +467,7 @@ function _getOrCreateTaskOperation(
466
467
if ( ! operation ) {
467
468
operation = new Operation ( {
468
469
groupName : task . parentPhase . phaseName ,
470
+ name : `${ task . taskName } task` ,
469
471
runner : new TaskOperationRunner ( {
470
472
internalHeftSession,
471
473
task
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ export interface IOperationExecutionOptions {
58
58
// @beta
59
59
export interface IOperationOptions {
60
60
groupName? : string | undefined ;
61
- name? : string | undefined ;
61
+ name: string ;
62
62
runner? : IOperationRunner | undefined ;
63
63
weight? : number | undefined ;
64
64
}
@@ -140,7 +140,7 @@ export interface IWatchLoopState {
140
140
141
141
// @beta
142
142
export class Operation implements IOperationStates {
143
- constructor (options ? : IOperationOptions );
143
+ constructor (options : IOperationOptions );
144
144
// (undocumented)
145
145
addDependency(dependency : Operation ): void ;
146
146
readonly consumers: Set <Operation >;
@@ -152,7 +152,7 @@ export class Operation implements IOperationStates {
152
152
_executeAsync(context : IExecuteOperationContext ): Promise <OperationStatus >;
153
153
readonly groupName: string | undefined ;
154
154
lastState: IOperationState | undefined ;
155
- readonly name: string | undefined ;
155
+ readonly name: string ;
156
156
// (undocumented)
157
157
reset(): void ;
158
158
runner: IOperationRunner | undefined ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export interface IOperationOptions {
22
22
/**
23
23
* The name of this operation, for logging.
24
24
*/
25
- name ? : string | undefined ;
25
+ name : string ;
26
26
27
27
/**
28
28
* The group that this operation belongs to. Will be used for logging and duration tracking.
@@ -101,7 +101,7 @@ export class Operation implements IOperationStates {
101
101
/**
102
102
* The name of this operation, for logging.
103
103
*/
104
- public readonly name : string | undefined ;
104
+ public readonly name : string ;
105
105
106
106
/**
107
107
* When the scheduler is ready to process this `Operation`, the `runner` implements the actual work of
@@ -174,11 +174,11 @@ export class Operation implements IOperationStates {
174
174
*/
175
175
private _runPending : boolean = true ;
176
176
177
- public constructor ( options ? : IOperationOptions ) {
177
+ public constructor ( options : IOperationOptions ) {
178
178
this . groupName = options ?. groupName ;
179
179
this . runner = options ?. runner ;
180
180
this . weight = options ?. weight || 1 ;
181
- this . name = options ? .name ;
181
+ this . name = options . name ;
182
182
}
183
183
184
184
public addDependency ( dependency : Operation ) : void {
You can’t perform that action at this time.
0 commit comments