Porting changes to gearman.coffee