Extrace running without gearman into function