Comments (17)
I don't think you've missed any steps. I use this feature all the time, so it's just a matter of figuring out why it's not working for you. :)
I need to add a generator to add in the dj_remixes columns, but you're delayed_jobs table should look something like this:
https://gist.github.com/739059
Oh, just had a brain storm, are you sure it's still not in the table? When it reenqueue's itself it gets a different ID because it's a new record. DJ deletes jobs from the database when they're done, so to get reenqueueing working without hacking at the core of DJ I simply clone the object and create a new job record for it. Can you check and see if that's what's happening?
from dj_remixes.
Hi, thanks for quick reply.
I updated the table to whats in your gist, and retried my approach. It's one row after I have added it manually. Then, after a minute, it's gone, no more rows in the table. If I add another manually, the ID is 2, one more than the last I added. So there is no other added automatically.
Weird stuff going on
from dj_remixes.
What version of DJ are you using?
from dj_remixes.
Try using:
gem 'delayed_job', '2.1.1'
I haven't tested it with the absolute latest version, so it's possible that there's a change that's breaking this behavior.
from dj_remixes.
I've tried both the latest gem and from master (Copy/paste the gem .. from your readme)
from dj_remixes.
Try 2.1.1 and see if that works.
from dj_remixes.
Hm .. No change.
from dj_remixes.
Hmm... bizarre. Try use rake jobs:work instead of the binary and see if there's any change. Also, as stupid as this sounds, make sure you're restarting both your rails env and the workers when you make changes to your Gemfile. I know, it's dumb thing to say, but sometimes we all forget the little steps. :)
from dj_remixes.
No change. Tried to create a fresh rails app, and it didn't help.
https://gist.github.com/739096 <- that's my test worker.
from dj_remixes.
That's really weird! You're worker worked just fine for me, no problems at all. Can gist you both your Gemfile and your Gemfile.lock so we can see what's up?
from dj_remixes.
Hm ..
My Gemfile: https://gist.github.com/739104
Gemfile.lock https://gist.github.com/739103
from dj_remixes.
What version of Ruby? I wonder if that's it? I'm using 1.9.2. What are you using?
from dj_remixes.
I have tried with
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.5.0]
and
ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-darwin10.5.0], MBARI 0x6770, Ruby Enterprise Edition 2010.02
from dj_remixes.
I just created a brand new Rails 3 project using your Gemfiles and it worked like a charm for me. If you give me an email I can zip up the project and send it your way to check out. Also, if you want to zip up your test project and send it my way, that might help to diagnose it.
from dj_remixes.
Ok, having seen your project, I think I figured out your problems.
1.) You need to add lib to your autoloads. In application.rb add the following:
config.autoload_paths += %W(#{config.root}/lib)
2.) Change the name of the file container the worker to update_feeds.rb instead of worker.rb. Rails works best when you use the convention of file name to class name.
Now try it. Once I did that everything seems to be working just fine for me.
Oh, and remove the lines that are doing the enqueuing in the file itself, and just try it manually in the console.
Let me know how that works for you.
from dj_remixes.
THANKS! Worked like a charm!
And the latest comments there, just my laziness ;) But thanks a lot!
from dj_remixes.
Whew! Glad it's all working now. Have fun!
from dj_remixes.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dj_remixes.