service binding error.. why?
any ideas why i get this Error:
worker A "consumer":
Worker B "producer":
errorTypeError: The RPC receiver does not implement the method "textLableMatch". errorTypeError: The RPC receiver does not implement the method "textLableMatch".worker A "consumer":
export default {
async fetch(request, env, ctx) {
try {
const lables = ['stuff', 'bla', 'box'];
const text = 'blablablalballb!';
const result = await env.WORKER_TEXT_LABLE_MATCH.textLableMatch(lables, text);
return new Response(JSON.stringify(result));
} catch (error) {
return new Response("error" + error, { status: 500 });
}
},
}; export default {
async fetch(request, env, ctx) {
try {
const lables = ['stuff', 'bla', 'box'];
const text = 'blablablalballb!';
const result = await env.WORKER_TEXT_LABLE_MATCH.textLableMatch(lables, text);
return new Response(JSON.stringify(result));
} catch (error) {
return new Response("error" + error, { status: 500 });
}
},
}; Worker B "producer":
export class LableMatch extends WorkerEntrypoint {
async textLableMatch(lables, text) {
console.log('Running ai mathing');
console.log('lables:' + lables + 'text:' + text);
const result = await this.aiMatching(lables, text);
return result;
}
}export class LableMatch extends WorkerEntrypoint {
async textLableMatch(lables, text) {
console.log('Running ai mathing');
console.log('lables:' + lables + 'text:' + text);
const result = await this.aiMatching(lables, text);
return result;
}
}