Skip to content

Commit

Permalink
Couple of fixes from CodeRabbit
Browse files Browse the repository at this point in the history
  • Loading branch information
ericallam committed Dec 19, 2024
1 parent bf4660f commit d5d8bb6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/v3/runMetadata/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class RunMetadataAPI implements RunMetadataManager {
}

refresh(requestOptions?: ApiRequestOptions): Promise<void> {
return this.#getManager().flush(requestOptions);
return this.#getManager().refresh(requestOptions);
}

get parent(): RunMetadataUpdater {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/v3/runMetadata/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class StandardMetadataManager implements RunMetadataManager {
return this.root;
},
update: (value) => {
this.queuedParentOperations.add({ type: "update", value });
this.queuedRootOperations.add({ type: "update", value });
return this.root;
},
stream: (key, value, signal) => this.doStream(key, value, "root", this.root, signal),
Expand Down
14 changes: 7 additions & 7 deletions packages/core/src/v3/runMetadata/noopManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ export class NoopRunMetadataManager implements RunMetadataManager {

get root(): RunMetadataUpdater {
return {
append: () => this.parent,
set: () => this.parent,
del: () => this.parent,
increment: () => this.parent,
decrement: () => this.parent,
remove: () => this.parent,
append: () => this.root,
set: () => this.root,
del: () => this.root,
increment: () => this.root,
decrement: () => this.root,
remove: () => this.root,
stream: () =>
Promise.resolve({
[Symbol.asyncIterator]: () => ({
next: () => Promise.resolve({ done: true, value: undefined }),
}),
}),
update: () => this.parent,
update: () => this.root,
};
}
}

0 comments on commit d5d8bb6

Please sign in to comment.