RailsCasts Pro episodes are now free!

Learn more or hide this

Eric Chernuka's Profile

GitHub User: ericchernuka

Comments by Eric Chernuka

Avatar

You'll need to set the time zone to the current user's time zone. It's probably setting it to Heroku's UTC time.

Before creating the calendar, set the time zone in the controller.

Avatar

Well, turns out that the after_save was causing the worker to spin up over and over. As I said above, the solution is to put this within your model.

ruby
def enqueue_image
  ImageWorker.perform_async(id, key) if !image_processed && key.present?
end
Avatar

A little late to the game, but I did this as an elegant solution.

ruby
def enqueue_image
  ImageWorker.perform_async(id, key) if !image_processed && key.present?
end
Avatar

I'm also looking into this. Might just implement my own and I'll share my findings.

Avatar

even though the id is different its actually the same job running over and over.

Avatar

This is a perfect use case for a project I'm starting. I'm running into a little issue where the sidekiq worker runs over and over on the same original image. I'm not quite sure whats going on, but if anyone can help why it keeps running that would be great. I haven't modified the 'gallery-after' code at all either.

ruby
2013-07-23T16:38:10Z 36085 TID-ox5o30a8s INFO: Starting processing, hit Ctrl-C to stop
2013-07-23T16:39:01Z 36085 TID-ox5oe79dg Painting::ImageWorker JID-ee968f66ab665e06faa8215d INFO: start
2013-07-23T16:39:24Z 36085 TID-ox5oe79dg Painting::ImageWorker JID-ee968f66ab665e06faa8215d INFO: done: 22.813 sec
2013-07-23T16:39:24Z 36085 TID-ox5odqw08 Painting::ImageWorker JID-55da36d8eed3566f1dcdbb8c INFO: start
2013-07-23T16:39:47Z 36085 TID-ox5odqw08 Painting::ImageWorker JID-55da36d8eed3566f1dcdbb8c INFO: done: 22.585 sec
2013-07-23T16:39:47Z 36085 TID-ox5oe79dg Painting::ImageWorker JID-1adb5d111658cbe7eec89e6c INFO: start
2013-07-23T16:40:07Z 36085 TID-ox5oe79dg Painting::ImageWorker JID-1adb5d111658cbe7eec89e6c INFO: done: 20.703 sec
2013-07-23T16:40:07Z 36085 TID-ox5odqw08 Painting::ImageWorker JID-090912e3a2ea344478a4328c INFO: start
2013-07-23T16:40:31Z 36085 TID-ox5odqw08 Painting::ImageWorker JID-090912e3a2ea344478a4328c INFO: done: 24.182 sec
2013-07-23T16:40:31Z 36085 TID-ox5oe79dg Painting::ImageWorker JID-336203a55a260f03a70283d6 INFO: start
2013-07-23T16:40:47Z 36085 TID-ox5oe79dg Painting::ImageWorker JID-336203a55a260f03a70283d6 INFO: done: 15.941 sec
2013-07-23T16:40:47Z 36085 TID-ox5odqw08 Painting::ImageWorker JID-603b95db7f12733b4d2544e6 INFO: start
2013-07-23T16:41:01Z 36085 TID-ox5odqw08 Painting::ImageWorker JID-603b95db7f12733b4d2544e6 INFO: done: 13.247 sec
2013-07-23T16:41:01Z 36085 TID-ox5oe79dg Painting::ImageWorker JID-ace98b247b037499edc6474d INFO: start
2013-07-23T16:41:21Z 36085 TID-ox5oe79dg Painting::ImageWorker JID-ace98b247b037499edc6474d INFO: done: 20.634 sec
2013-07-23T16:41:21Z 36085 TID-ox5odqw08 Painting::ImageWorker JID-2598b2d38154f349b53fe6e5 INFO: start