- seed_nodes (hashed bearer tokens) and seed_ranges (planned ranges with lease, resume point and counts); migration …140. - SeedOrchestrator: lease (oldest plan first, FOR UPDATE SKIP LOCKED; a lease without a batch for 15 min passes to the next node and resumes at next_id), batch (stores files and fragments, moves next_id), finish, release, plan (from below live indexing / the backfill / earlier plans down to N days back; takes over the group's backfill), status. - Seed API under /api/v1/seed (lease, ranges/:id/batches|done|release, status) behind a node-token middleware; JSON bodies up to 64 MB after gzip. - seed:node runs a node: no database or Redis, outgoing HTTPS only, N connections, gzip batches, retries for network errors and 5xx, drops a range on 409, gives its ranges back on SIGTERM. seed-node/ has a compose file that builds the image from this repository. - seed:token, seed:plan, seed:status for the operator. Header parsing moved to lib/ingest and the range loop to lib/seed/runner, shared by seed:range and seed:node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
84 lines
1.8 KiB
TypeScript
84 lines
1.8 KiB
TypeScript
import { defineConfig } from '@adonisjs/core/bodyparser'
|
|
|
|
const bodyParserConfig = defineConfig({
|
|
/**
|
|
* Parse request bodies for these HTTP methods.
|
|
* Keep this aligned with methods that receive payloads in your routes.
|
|
*/
|
|
allowedMethods: ['POST', 'PUT', 'PATCH', 'DELETE'],
|
|
|
|
/**
|
|
* Config for the "application/x-www-form-urlencoded"
|
|
* content-type parser.
|
|
*/
|
|
form: {
|
|
/**
|
|
* Normalize empty string values to null.
|
|
*/
|
|
convertEmptyStringsToNull: true,
|
|
|
|
/**
|
|
* Content types handled by the form parser.
|
|
*/
|
|
types: ['application/x-www-form-urlencoded'],
|
|
},
|
|
|
|
/**
|
|
* Config for the JSON parser.
|
|
*/
|
|
json: {
|
|
/**
|
|
* Normalize empty string values to null.
|
|
*/
|
|
convertEmptyStringsToNull: true,
|
|
|
|
/**
|
|
* Seeding nodes post batches of a few MB (CONCEPT.md D38); the limit applies after gzip.
|
|
*/
|
|
limit: '64mb',
|
|
|
|
/**
|
|
* Content types handled by the JSON parser.
|
|
*/
|
|
types: [
|
|
'application/json',
|
|
'application/json-patch+json',
|
|
'application/vnd.api+json',
|
|
'application/csp-report',
|
|
],
|
|
},
|
|
|
|
/**
|
|
* Config for the "multipart/form-data" content-type parser.
|
|
* File uploads are handled by the multipart parser.
|
|
*/
|
|
multipart: {
|
|
/**
|
|
* Automatically process uploaded files into the system tmp directory.
|
|
*/
|
|
autoProcess: true,
|
|
|
|
/**
|
|
* Normalize empty string values to null.
|
|
*/
|
|
convertEmptyStringsToNull: true,
|
|
|
|
/**
|
|
* Routes where multipart processing is handled manually.
|
|
*/
|
|
processManually: [],
|
|
|
|
/**
|
|
* Maximum accepted payload size for multipart requests.
|
|
*/
|
|
limit: '20mb',
|
|
|
|
/**
|
|
* Content types handled by the multipart parser.
|
|
*/
|
|
types: ['multipart/form-data'],
|
|
},
|
|
})
|
|
|
|
export default bodyParserConfig
|