Giter Club home page Giter Club logo

Comments (10)

jfrux avatar jfrux commented on July 17, 2024

Well, I've made it a bit further. I'll keep you posted.

from capistrano-resque.

jfrux avatar jfrux commented on July 17, 2024

Okay so now it just hangs at this output:

INFO Starting 2 worker(s) with QUEUE: *
DEBUG [c36a53e3] Running /usr/bin/env if test ! -d /home/getmycme/public_html/current; then echo "Directory does not exist '/home/getmycme/public_html/current'" 1>&2; false; fi on 10.97.106.134
DEBUG [c36a53e3] Command: if test ! -d /home/getmycme/public_html/current; then echo "Directory does not exist '/home/getmycme/public_html/current'" 1>&2; false; fi
DEBUG [9d5df1e7] Running /usr/bin/env if test ! -d /home/getmycme/public_html/current; then echo "Directory does not exist '/home/getmycme/public_html/current'" 1>&2; false; fi on 10.97.106.134
DEBUG [9d5df1e7] Command: if test ! -d /home/getmycme/public_html/current; then echo "Directory does not exist '/home/getmycme/public_html/current'" 1>&2; false; fi

and if I run it directly on the server:

$ cd /home/getmycme/public_html/current && RBENV_ROOT=/usr/local/rbenv RBENV_VERSION=1.9.3-p448 /usr/local/rbenv/bin/rbenv exec bundle exec rake RAILS_ENV=production QUEUE="imports_queue" PIDFILE=./tmp/pids/resque_work_1.pid BACKGROUND=yes VERBOSE=1 INTERVAL=5 environment resque:work
$ rake aborted!
No such file or directory - ./tmp/pids/resque_work_1.pid
/home/getmycme/public_html/shared/bundle/ruby/1.9.1/gems/resque-1.25.1/lib/resque/tasks.rb:36:in `initialize'
/home/getmycme/public_html/shared/bundle/ruby/1.9.1/gems/resque-1.25.1/lib/resque/tasks.rb:36:in `open'
/home/getmycme/public_html/shared/bundle/ruby/1.9.1/gems/resque-1.25.1/lib/resque/tasks.rb:36:in `block (2 levels) in <top (required)>'
Tasks: TOP => resque:work
(See full trace by running task with --trace)

from capistrano-resque.

jfrux avatar jfrux commented on July 17, 2024

Ya so, I think I need some help with this... just tested it on 1.9.3-p448 and 2.0.0-p353 and neither will get past this step.

Kind of at a loss...

from capistrano-resque.

dmarkow avatar dmarkow commented on July 17, 2024

Just to confirm, is this a 3.1-specific problem (i.e. it worked fine on 3.0?)

I didn't realize 3.1 dropped, I'll take a look at it when I have a few minutes.

from capistrano-resque.

dmarkow avatar dmarkow commented on July 17, 2024

Try the current master branch. We were using some threading code to start multiple instances at once, but it seems to be incompatible with SSHKit 1.3.0 (which Capistrano 3.1 uses). For the time being, I've removed threading for the Cap 3.x code.

from capistrano-resque.

cgallemore avatar cgallemore commented on July 17, 2024

I'm seeing this exact issue in my current project. We are using Cap 3.1 and I saw the same issues that was originally reported. When I run the cap command it just hangs and then we I ssh in and run it manually I get the same error:

No such file or directory - ./tmp/pids/resque_work_1.pid
/var/www/providermatch/shared/bundle/ruby/2.0.0/gems/resque-1.25.1/lib/resque/tasks.rb:36:in initialize' /var/www/providermatch/shared/bundle/ruby/2.0.0/gems/resque-1.25.1/lib/resque/tasks.rb:36:inopen'
/var/www/providermatch/shared/bundle/ruby/2.0.0/gems/resque-1.25.1/lib/resque/tasks.rb:36:in `block (2 levels) in <top (required)>'

Was this confirmed that removing the threading fixed the issue?

from capistrano-resque.

dmarkow avatar dmarkow commented on July 17, 2024

@cgallemore You say you have the same problem outside of Capistrano? If so, I don't think it has anything to do with threading.

It might be that Resque doesn't like relative file paths for the PID, can you test it with a full path to a PID file (rather than ./tmp/pids/resque_work_1.pid) and let me know if it works? If so, I'll update the resque tasks to use a full path instead of a relative one.

from capistrano-resque.

cgallemore avatar cgallemore commented on July 17, 2024

Ok, I tried a full path and got the same issue. Trying one more thing, I removed the pids directory from the file and just used ./tmp/resque_work_1.pid and that worked as expected. Looks like it's just simply an issue of not having the pids directory in the tmp folder, I kind of assumed that Cap would create that if it didn't exist. I'm a Cap noob though, so that assumption could totally be false.

from capistrano-resque.

dmarkow avatar dmarkow commented on July 17, 2024

Ah, that makes sense. It's fairly common on a Rails project to have a tmp/pids folder already in place, but we shouldn't assume without checking. At the very least I'll add a directory check so Capistrano will complain if the folder is missing. Thanks!

from capistrano-resque.

cgallemore avatar cgallemore commented on July 17, 2024

Cool, thanks

from capistrano-resque.

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.