Resolve is the better name here again
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user