I do think that given how well this is separated out, it should be fairly straightforward to convert to be used by a gearman worker, and just fire off a job when the embed is created/edited!