vendredi 27 février 2015

Workless gem with MongoID - after_create callback isn't firing

I have a production application with Workless and DJ & MongoMapper running just fine - after a document is created in the delayed_jobs queue Workless starts a Heroku worker and works off the job - shuts it down when there are no more jobs - this is brilliant.


I'm migrating over to MongoId and I've found that Workless will not start up.


At first I thought it had to do with the failed_at field not being present on newly created documents in this collection which I created an issue for here: http://ift.tt/1ASsr50


But patching my own version of DJ to forcefully set this attribute to nil hasn't resolved the issue of the after_create callback not firing.


Has anyone ran into any issue with Workless gem where it won't start a worker on Heroku and your solution was NOT one of the following:



  1. Set Heroku API Key env var on Heroku app (done)

  2. Set Heroku APP name (done)

  3. Reset the above two just in case you messed something up (done)

  4. Accepted the API terms of service the first time you try to use a worker and set a form of payment (you can't get the API key without it if I recall - but done anyway)


?


I cannot figure the cause of after_create not firing when it should. I also couldn't successfully run the spec tests locally with workless, need more study of this gem to get that going.


Aucun commentaire:

Enregistrer un commentaire