foreach icon indicating copy to clipboard operation
foreach copied to clipboard

Proxy settings are not exported inside foreach block

Open vipulg13 opened this issue 4 years ago • 1 comments

Hello,

A call to a function, which uses proxy gateway that are defined in a global environment, is not working inside foreach block despite setting .export = ls(.GlobalEnv) and .packages = c("httr", "crul", "curl").

Though, I am able to execute the code successfully when I explicitly call 'crul::set_proxy(proxy(url))' inside foreach block. I would like to avoid setting proxy settings inside foreach block.

Can someone please suggest a workaround for this.

Thanks!

vipulg13 avatar Jan 28 '21 13:01 vipulg13

This is a good candidate for setting in ~/.Rprofile so that it is applied automatically in all R processes when they start, including parallel workers.

HenrikBengtsson avatar Apr 05 '21 23:04 HenrikBengtsson