The job uses the environment of its Sidekiq worker, not a new terminal or Rails web process. For a foreground worker whose HTTP client reads these variables:

http_proxy=http://proxy.example.net:8080 \
https_proxy=http://proxy.example.net:8080 \
bundle exec sidekiq

For Sidekiq's documented systemd-managed Linux arrangement, put the values in the actual worker unit's drop-in:

[Service]
Environment="http_proxy=http://proxy.example.net:8080"
Environment="https_proxy=http://proxy.example.net:8080"

Reload unit definitions and replace the worker through the deployment's normal restart procedure. Reloading Rails code in an existing worker does not replace its inherited environment.

A public-service check can use an endpoint from the HTTP proxy list in these values when public intermediaries are permitted and the worker’s client has no configured or retained proxy credentials. With several queue-specific units, identify which one executed the failed job. A success from another worker does not establish this one's configuration.

Record that unit and HTTP client together. An explicitly configured client can use another route regardless of variables delivered to the worker; configure its supported interface in that case.

متعلقہ مضامین