Avoid errors on signals when the engine is run through the server

Quick and dirty fix for https://bugs.launchpad.net/oq-engine/+bug/1310726

I would wait @micheles ok before merging.