# throttler

Regulates the consultation events' stream by artificially adding time between each treatment

# Headers

  • Throttling : Minimum time to wait between queries in milliseconds. Defaults to 0ms.

# How to use

# ezPAARSE config

You can add or remove your throttler on ezpaarse config. It will be used on every process that used throttler middleware. You need to add this code on your config.local.json.

{
  "EZPAARSE_DEFAULT_HEADERS": {
    "Throttling": "<time to wait between queries in milliseconds>"
  }
}

# ezPAARSE admin interface

You can add or remove throttler by default to all your enrichments. To do this, go to the middleware section of administration.

image

# ezPAARSE process interface

You can use throttler for an enrichment process.

image

# ezp

You can use throttler for an enrichment process with ezp (opens new window) like this:

# enrich with one file
ezp process <path of your file> \
  --host <host of your ezPAARSE instance> \
  --settings <settings-id> \
  --header "ezPAARSE-Middlewares: throttler" \
  --header "throttler: <time in miniseconds>" \
  --out ./result.csv

# enrich with multiples files
ezp bulk <path of your directory> \
  --host <host of your ezPAARSE instance> \
  --settings <settings-id> \
  --header "ezPAARSE-Middlewares: throttler" \
  --header "throttler: <time in miniseconds>"

# curl

You can use throttler for an enrichment process with curl like this:

curl -X POST -v http://localhost:59599 \
  -H "ezPAARSE-Middlewares: throttler" \
  -H "throttler: <time in miniseconds>" \
  -H "Log-Format-Ezproxy: <line format>" \
  -F "file=@<log file path>"

Last Updated: 6/19/2024, 5:59:38 AM