Updated worker api, added "config" parameter.