Giter VIP home page Giter VIP logo

Comments (7)

nickjj avatar nickjj commented on July 27, 2024
  • Since you mentioned the .env file I imagine you're talking about development mode?
  • Is there anything that looks suspicious in the console log when you add the job or shortly after?
  • Did you name the queue in your worker class? If so you need to add it to the queue list in config/sidekiq.yml.

You might want to paste your worker code too.

from orats.

pacuna avatar pacuna commented on July 27, 2024
  • Yes, development mode.
  • Nothing suspicious in the console.
  • I haven't named the queue, the job goes to the default queue.

I tried to dispatch the job using Worker.new.perfom() and it works, but it blocks the application until the work is finished. That's why I think that maybe it's a worker configuration problem in puma.

My worker:

class VideoUploaderWorker
  include Sidekiq::Worker

  def perform(file)
    upload = Vimeo::Advanced::Upload.new( "xxx", "xxx",:token => "xxx", :secret => "xxx")
    @video_id = upload.upload(file, file.size, file.original_filename)
    p @video_id
  end
end

The worker receives an uploaded file object and use the vimeo api to upload the video directly to vimeo. Like I said, the code works if I use .new.perform instead of perform_async.
In my controller I use:

    file = params[:file_data]
    VideoUploaderWorker.perform_async(file)

Another thing, in my sidekiq dashboard, in the top always says 'idle'. Is that normal?
Thanks for you help.

from orats.

nickjj avatar nickjj commented on July 27, 2024

@pacuna, I'm in the middle of making some pretty big changes to orats and I think I may have stumbled on what's causing your issue.

Can you do me a favor and login to your server and run these commands:

redis-cli
If your redis server is password protected then add -a yourpassword to the above command.

You should be at an interactive prompt with redis, then enter this and include the output here: KEYS *

from orats.

pacuna avatar pacuna commented on July 27, 2024

I'm getting a lot of this:

1) "encuestas-utfsm::cache:account:388"
  2) "encuestas-utfsm::cache:account:66"
  3) "encuestas-utfsm::cache:account:140"
  4) "encuestas-utfsm::cache:account:243"
  5) "encuestas-utfsm::cache:account:286"
  6) "encuestas-utfsm::cache:account:63"
  7) "encuestas-utfsm::cache:account:458"
  8) "encuestas-utfsm::cache:account:264"
  9) "encuestas-utfsm::cache:account:318"
 10) "encuestas-utfsm::cache:account:255"
 11) "schedule"
 12) "fa3d964cd0c606ab60c4114ac9f144df"
 13) "encuestas-utfsm::cache:account:390"
...

encuestas-utfsm is my orats project

from orats.

nickjj avatar nickjj commented on July 27, 2024

Did you change the name space to cache in the config/initializers/sidekiq.rb file? There should be a bunch of encuestas-utfsm::sidekiq_development keys if you're running in development unless you changed it.

Changing it shouldn't matter tho, just curious.

Also have you tried making a non-orats app with the same sidekiq setup? If not I'd appreciate if you could just rails new a simple app and add sidekiq to it along with your worker class, then see what happens.

from orats.

pacuna avatar pacuna commented on July 27, 2024

I haven't touch the sidekiq config. I've checked the full output of KEYS * and there is some entries with this:

326) "encuestas-utfsm::sidekiq_development:processes"

But just a few in between a lot of the cache entries.

I'm going to try that and see what happens.
Thanks!

from orats.

nickjj avatar nickjj commented on July 27, 2024

Going to close this as it's approaching 2015 without a definitive answer.

If it comes up again, please open a new ticket.

from orats.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.