GithubHelp home page GithubHelp logo

raad's People

Contributors

colinsurprenant avatar praized avatar remi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

raad's Issues

Unable to start service on Mac

I can't start a simple service. Here is the output:

$ ruby lib/scheduler/runner.rb start

Raad service wrapper v0.5.0 starting
[4738:INFO] 2013-02-03 21:43:30 :: starting runner service in development mode
[4738:INFO] 2013-02-03 21:43:30 :: stopping runner service
[4738:INFO] 2013-02-03 21:43:30 :: >> Raad service wrapper stopped

Lose access to ActiveRecord in daemon mode

I have a background job in which I need to access ActiveRecord models. If I start it without '-d', things work fine - I can access the database through AR models; but once I put '-d' in the command, the script doesn't work anymore.

I wonder if anybody has seen this before?

Test suite fails in Ubuntu 10.04

sh rvm_setup.sh
yields
rvm_setup.sh: 13: [[: not found rvm_setup.sh: 13: [[: not found ERROR: An RVM installation was not found.

Changing the [[]]'s to [] seems to help in some cases.

Also,
function waitline {...}
yields
function: not found

Changing it to
assert() {...}
lets it work

bootstrap-less option

Hello! Thanks for this gem!

I have an existing Thor-based command-line interface that I want to have start|stop to daemonize, but also needs a variety of other CLI options. The way the Raad gem is currently set up with bootstrapping, it appears to assume that the only command-line options are start/stop. It also seems to makes assumptions based on the current filename for service initiation that, in my case, would not make sense.

I can hack what I need together with some ideas from this gem, but this is what I would have loved to see:

in bin/my_app:

require 'raad'
require 'thor'

class MyApp < Thor

  default_task :start

  desc "Start My App", "Starts App Server"
  def start

    daemonize = true

    if daemonize
      Raad::Runner.new('ruby path_to_my_service_starter.rb').daemonize
    else
      MyServiceStarter.run
    end
  end

  desc "Some other option I need"
  def my_option
  end

end

Or something to this effect. Not really an issue, just a suggestion. Thanks again.

Raad.env not correct in service.initialize

In my application I did setup the environment in the initialize method.
So i changed it to 'my_env = Raad.env'
But it's always the default 'development' value.
If i move the statement to the start method it return the correct value (from the -e option)

any idea ?

add double ^C to force kill service

first ^C will call the stop method and if the start thread still hangs, it will wait up to the defined timeout (default 60s) to force kill. a second ^C should provide a force kill shortcut.

option to turn off logging

currently there is no way to completely disable logging: in console mode by default logging is in the console and in daemon mode, logging is in the default log file.

log4r 1.1.10 generates a warning in JRuby environments

Just a heads up and not directly related to RAAD.

Whenever RAAD is initiated, the following warning is generated:

.../gems/log4r-1.1.10/lib/log4r/formatter/patternformatter.rb:126 warning: Ambiguous first argument; make sure.

I sent in a pull request to fix it it in log4r: nbrochu/log4r@e54e97146c474cabc56e1da616b65393cc2b91bf

friendlier error handling for log file permission errors

Errno::ENOENT: No such file or directory - 
              mkdir at org/jruby/RubyDir.java:581
           fu_mkdir at /home/jenko/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/1.9/fileutils.rb:247
            mkdir_p at /home/jenko/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/1.9/fileutils.rb:221
       reverse_each at org/jruby/RubyArray.java:1691
            mkdir_p at /home/jenko/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/1.9/fileutils.rb:219
               each at org/jruby/RubyArray.java:1611
            mkdir_p at /home/jenko/.rvm/rubies/jruby-1.7.0.preview1/lib/ruby/1.9/fileutils.rb:205
  setup_file_logger at /home/jenko/.rvm/gems/jruby-1.7.0.preview1@barebones/gems/raad-0.5.0/lib/raad/logger.rb:42
              setup at /home/jenko/.rvm/gems/jruby-1.7.0.preview1@barebones/gems/raad-0.5.0/lib/raad/logger.rb:17
      start_service at /home/jenko/.rvm/gems/jruby-1.7.0.preview1@barebones/gems/raad-0.5.0/lib/raad/runner.rb:91
                run at /home/jenko/.rvm/gems/jruby-1.7.0.preview1@barebones/gems/raad-0.5.0/lib/raad/runner.rb:80
               run! at /home/jenko/.rvm/gems/jruby-1.7.0.preview1@barebones/gems/raad-0.5.0/lib/raad/bootstrap.rb:44
               Raad at /home/jenko/.rvm/gems/jruby-1.7.0.preview1@barebones/gems/raad-0.5.0/lib/raad/bootstrap.rb:63

friendlier error handling for invalid service class name

NameError: uninitialized constant MyServiceClass
  const_missing at org/jruby/RubyModule.java:2715
         (eval) at (eval):1
    module_eval at org/jruby/RubyModule.java:2354
           run! at /home/jenko/.rvm/gems/jruby-1.7.0.preview1/gems/raad-0.5.0/lib/raad/bootstrap.rb:43
           Raad at /home/jenko/.rvm/gems/jruby-1.7.0.preview1/gems/raad-0.5.0/lib/raad/bootstrap.rb:63

this is when there is a mismatch between the command line service name and the actual class name which must match the camelcasing of the service name.

Empty pid file bug

When the pid file is empty pid and read_pid_file methods return 0, because en empty string is converted to zero by to_i. And since process with pid 0 always exists in the system the daemon can't be started or restarted. That also happens for other non-integer content of the pid file

Empty pid file can occur when there's no space left on device. Additionally, number of bytes could be checked to distinguish this case (and maybe delete the pid file?).

Using warbler to pack script

Sorry if this is stupid question, but I am trying to pack a daemon in a JAR using warble. The script runs as expected in jruby, but once packed using warble and running:

java -jar Script.jar start

produces no output, no log, and just exists gracefully without any warning/error. how can I produce some logs to check why the daemon is not firing up?

Thanks in advance.

Support to pass parameters

It would be nice to pass parameters to the service.

ex: before radd I did run the ruby with "ruby GetResponseByPop3.rb test"
with raad I run it with "ruby GetResponseByPop3.rb start"

but it would be nice to add -- test to pass my parameters

any idea , or I am wrong ?

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.