fix worker instance misconfiguration

Hi

I've added passing config into the worker. Could you please review.

Thanks
Please add documentation for the config param here.