Skip to content

Commit

Permalink
Merge pull request #4142 from jeclrsg/feat-comms-workunit-refresh-req…
Browse files Browse the repository at this point in the history
…uest

feat(comms): allow the WU refresh function to accept optional request
  • Loading branch information
GordonSmith authored Nov 16, 2023
2 parents 9e232fc + adc513b commit 284e94c
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 284e94c

Please sign in to comment.