Updated API and tests for Gearman