nesquena / dante Goto Github PK
View Code? Open in Web Editor NEWTurn any ruby code into a daemon.
License: MIT License
Turn any ruby code into a daemon.
License: MIT License
Hi,
I am packaging dante for Debian. When I try to run the tests using bundle exec rake test
, I am getting different errors each time.
The logs of three such runs can be found here - http://paste.debian.net/285198/
Can you help me find out what is the issue?
Dante is pretty nice. I tried to use the classes in a project of mine, not as a CLI daemon, but as a in process daemon - (The use case, was spawning a service, inside of cucumber). It works perfectly with one exception.
But I encountered what I consider a problem. When a runner is executed , Dante uses the OptionParser. Of course, the OptionParser, uses ARGV. So when someone uses Dante in the code, rather than from the CLI, it is possible to pass arguments to Dante, that Dante does not understand.
Maybe you only want to use Dante from the CLI, but it works pretty well in the code too. There is no similar code in daemon_spawn, or Daemons, that does what Dante can do in this regard.
This will give us a org that allows us to expand if we have extension gems and avoids putting pressure under the original creator.
Please create a new tag and release 1.6 gem of dante
I figured this issue: can't change access mode from "r+" to "a" (ArgumentError)
while was using stripe-ruby-mock gem w/ both Spring and Zeus preloaders.
The problem is in https://github.com/nesquena/dante/blob/master/lib/dante/runner.rb#L253 and I'm curious is it possible to simply remove 'a'
option (all is well without it) or there is should be more complex solution?
We can get the free ones when pushing to the new repository.
From @krainboltgreene
We should really just use the stdlib logger, it's much better.
I should be able to call Dante.logger.info("Foo")
Totally agree, want to leave this as a reminder.
Hi, I'm planning on using Dante for a script which doesn't open any ports (it listens and emits to MQs) - I think there ought to be a way for folks to remove the -p PORT option (or any other) from dante's default listings.
This gets out the latest changes to people who might really want them.
I might be missing something very obvious here, but would it be possible to add some kind of configuration option to alter the default log output for Dante's own messages? I currently work around this by redefining the log
method inside the Dante::Runner
class like so:
module Dante
class Runner
def log(message)
puts "[#{Time.now}] #{message}"
end
end
end
I could add an option to Runner
class that takes a proc or a lambda that would be responsible for formatting the default log output. The default value for this option would simply puts
the message like the current implementation for log
does. Would that solution work for you?
In addition, it might be helpful to expose the log
method on the Dante
module so daemon implementations can also make use of the same formatting. Any opinion or suggestions on that?
At some point I'll need to be added to the rubygems.org gem author list, so I can push things.
Dante 0.2.0 specifies the method "verify_options_hook" in its attr_accessor (under dante/runner.rb). I have verified that I have the same code, and am at a total loss as to why this is happening. I use attr_* elsewhere in my own code with no issues at all. Strangely, this method is utilized in the documentation on the gem homepage.
A simple pry on a Dante::Runner object, and a methods.sort shows, indeed, that there is no such method (nor is there a method for the others listed in the attr_accessor line).
I'm not sure if anyone has any ideas as to why this happens, but I'd love to hear them if you do. I don't really have the time to look into this more, as I'm doing this for work-related purposes, but will try to come back to it when I get some free time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.