Tuesday, September 9, 2008

BackgrounDrb.destroy

So we've been noticing some pretty odd things with BackgrounDrb lately. In spite of our previous fixes to BackgrounDrb, we've decided to give up on it. Why? Simply put: It's not working properly.

We've been checking the logs recently, and we've noticed way too many calls to our scheduled tasks. On the odd days, we'll get 3 or 4 extra calls when only 1 was scheduled. I don't know how to explain this, nor do I wish to find out, because frankly, I'm fed up with this.

I admit, it really was my fault for trying to use an overly complicated program to run something very simple. KISS - I know. I'm kicking myself in the ass for this now! Anyways, simple solution: cron. It's the most basic of basic schedulers. You can't go wrong here.

Luckily, all our functions were encapsulated in the models, so the logic didn't need to be changed. We ripped out the stuff in the BackgrounDrb worker and placed them in a rake file. We then called the rake tasks from the cron.

Very simple. Very clean.

Bye Bye BackgrounDrb!


W

2 comments:

gnufied said...

Sad!

What version, were you running? May be if you don't need real time feedback, cron job will do just the fine. But, as ass who wrote backgroundrb, I would be interested about the bug problem you faced. If yes, can you kindly mail me, about which version you were using? How were you scheduling your tasks? Did you see any exceptions in log files?

I know its probably a lost cause, but might be useful for other users.

Two Blind Devs said...

Not sure how to reply to you by email, so I'll leave a comment here:

Yes, sad indeed! I was actually quite happy with using BackgrounDrb.

Unfortunately, I can't quite remember which version we had. I've been using the same version for a few months now. Maybe started back in March? April?

We were using the backgroundrb.yml to schedule our tasks. In there, we had the usual:

# yml has correct spacing, but spaces don't show up here T.T
:schedules:
:worker_name:
:method_name:
:trigger_args: ...cron-style scheduling...

Also, there were no exceptions in the log files, which I found very odd. Which was also the reason why I decided not to dig further.


W