Skip to content

Commit

Permalink
feat(comms): allow the WU refresh function to accept optional request
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Clements <[email protected]>
  • Loading branch information
jeclrsg committed Nov 15, 2023
1 parent 9e232fc commit adc513b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/comms/src/ecl/workunit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,8 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
return this;
}

async refreshInfo(): Promise<this> {
await this.WUInfo();
async refreshInfo(request?: Partial<WsWorkunits.WUInfo.Request>): Promise<this> {
await this.WUInfo(request);
return this;
}

Expand All @@ -441,9 +441,9 @@ export class Workunit extends StateObject<UWorkunitState, IWorkunitState> implem
return this;
}

async refresh(full: boolean = false): Promise<this> {
async refresh(full: boolean = false, request?: Partial<WsWorkunits.WUInfo.Request>): Promise<this> {
if (full) {
await Promise.all([this.refreshInfo(), this.refreshDebug()]);
await Promise.all([this.refreshInfo(request), this.refreshDebug()]);
} else {
await this.refreshState();
}
Expand Down

0 comments on commit adc513b

Please sign in to comment.