jobs - Backburner rake task - NameError: undefined local variable or method -


i'm starting backburner run jobs in background of app. i've tried following documentation under "working jobs", i'm doing obvious , incorrect.

gemfile:

gem 'backburner' 

rakefile:

require_relative 'config/application' require 'backburner/tasks'  rails.application.load_tasks 

and in rails console:

rake backburner:work 

(which think run pending, enqueued backburner jobs.)

but error: nameerror: undefined local variable or method 'work' main:object (pry):1:in '__pry__'

i sorta know pry (i use throw binding.pry code debug, that's it), have no idea how might causing this. not mention i'm still pretty weak on whole jobs , rake task front in general.

any appreciated!

apparently i'm in business of asking dumb questions, lately. passing variable backburner.enqueue id, expected numerical, so: @admin.id. have been fine if @admin defined in scope of helper i'm calling enqueue in, i'm passing variable helper method...which means @admin not defined, which, guess daniel, means @admin.id undefined. means i'm hitting job anyways (because no, backburner in fact not breaking), i'm not getting job enqueued way thought because passing invalid property it.

so sort of turns out error got looked unrelated issue, there is. pass variables methods expecting, or else expect errors.

edit:
also, can't downvote own post. tried. deserves it.

edit 2:
turns out it's hard/not supported beanstalkd going on heroku. der. should have checked that. liked how beanstalkd handling things , went before getting deploy , realizing no-go.

instead, went resque suggested heroku. support delayed job (dj), noted pretty heavy , resque better.

all say, finally got needed go resque, , because such a thing made little documentation me (and maybe other sad soul stumbles across lame post) background workers running on heroku-hosted rails app in future. warned: guide dummies me, since had puzzle out lot of obvious me. there gaps in resque documentation i've included, boils down being explicit things mean, , things go.


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -