Don't disconnect when running tasks inline

This fixes issues in production and testing environments.
Merge pull request #4 from carnesmedia/master

Don't disconnect when running tasks inline