How are you calling it? Can you share a snippet?
How are you calling it? Can you share a snippet?
upload_source_maps or services -> entrypointhello as we couldn't find a wrangler dev session for service "pdfparser" to proxy to"Response instead? the post doesn't seem to saybody of a fetch response for it to be garbage collected properly? Sometimes I make requests but don't care about the body and want to make sure this is ok"Get \"http://customer-accounts-service.outbound.svc.cluster.local.:9292/v1/accounts/cloudflare\": read tcp 100.112.254.53:39318->100.70.108.250:9292: read: connection reset by peer"@cloudflare/workers-types/experimental fixes my type issues with Workers RPC@cloudflare/workers-types/2023-07-01 support the new RPC functionality?upload_source_mapsservices -> entrypointResponse"Get \"http://customer-accounts-service.outbound.svc.cluster.local.:9292/v1/accounts/cloudflare\": read tcp 100.112.254.53:39318->100.70.108.250:9292: read: connection reset by peer"@cloudflare/workers-types/experimental@cloudflare/workers-types/2023-07-01async function membershipRequestHandler (request: Request, env: Env) {
const body = await request.arrayBuffer();
console.log(`Parsing PDF size ${body.byteLength / 1024 / 1024} MBs`)
const result = await env.PDFPARSER_SERVICE.parsePdf(body);export class PdfParserService extends WorkerEntrypoint<Env> {
async fetch() { return new Response("Hello from Worker B"); }
async parsePdf(data: ArrayBuffer) {
return await pdf2array(Buffer.from(data));
}
}[[services]]
binding = "PDFPARSER_SERVICE"
service = "pdfparser"
entrypoint = "PdfParserService"name = "newdo"
main = "src/index.ts"
compatibility_date = "2024-04-06"
compatibility_flags = [ "nodejs_compat" ]
logpush = true
upload_source_maps = true
[vars]
SERVICE_NAME = "datawrangler"
[[services]]
binding = "PDFPARSER_SERVICE"
service = "pdfparser"
entrypoint = "PdfParserService"
[[d1_databases]]
binding = "DB" # i.e. available in your Worker on env.DB
database_name = "memberships"
database_id = "xxxxxxxxxxx"
migrations_dir = "../database/src/migrations"
[[durable_objects.bindings]]
name = "MY_DURABLE_OBJECT"
class_name = "MyDurableObject"
[[migrations]]
tag = "v1"
new_classes = ["MyDurableObject"]