Resolve is the better name here again

This commit is contained in:
Eric Allam
2023-01-02 14:14:22 +00:00
parent 893ed0470f
commit 1fcc27b990
4 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -399,7 +399,7 @@ export class TriggerServer {
return true;
}
const success = await this.#serverRPC.send("COMPLETE_REQUEST", {
const success = await this.#serverRPC.send("RESOLVE_REQUEST", {
id: data.id,
output: data.output,
meta: {
+1 -1
View File
@@ -18,7 +18,7 @@ export const HostRPCSchema = {
}),
response: z.void().nullable(),
},
COMPLETE_REQUEST: {
RESOLVE_REQUEST: {
request: z.object({
id: z.string(),
output: JsonSchema.default({}),
@@ -115,7 +115,8 @@ export class ZodSubscriber<SubscriberSchema extends MessageCatalogSchema> {
this.#logger.error("[ZodSubscriber] Error handling message", e);
}
consumer.negativeAcknowledge(msg);
// TODO: Add support for dead letter queue
await consumer.acknowledge(msg);
}
}
+1 -1
View File
@@ -109,7 +109,7 @@ export class TriggerClient<TSchema extends z.ZodTypeAny> {
sender: ServerRPCSchema,
receiver: HostRPCSchema,
handlers: {
COMPLETE_REQUEST: async (data) => {
RESOLVE_REQUEST: async (data) => {
const requestCallbacks = this.#responseCompleteCallbacks.get(data.id);
if (!requestCallbacks) {