gemcutter-ready. memory-based-transactions. (100x faster, but no transactionlogs!)
This commit is contained in:
parent
34bb509b92
commit
3cc2e489b5
3 changed files with 11 additions and 54 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
0.0.2
|
||||
0.0.2.1
|
||||
|
|
12
bin/s2l.rb
12
bin/s2l.rb
|
@ -116,14 +116,22 @@ class Main < RobustServer
|
|||
@serv = S2L.new :sock => TCPServer.new( *@conf[:server])
|
||||
info :create => {:home => @conf[:home]}
|
||||
Dir.mkdir @conf[:home] rescue Errno::EEXIST
|
||||
@sigs[:INT] = @sigs[:TERM] = method(:shutdown)
|
||||
end
|
||||
|
||||
def shutdown s = nil
|
||||
$stderr.puts [:signal, s, Signal[s]].inspect
|
||||
@serv.close
|
||||
exit 0
|
||||
end
|
||||
|
||||
def run
|
||||
info :open => SBDB::Env
|
||||
SBDB::Env.new( @conf[:home], SBDB::CREATE | SBDB::Env::INIT_TRANSACTION | Bdb::DB_AUTO_COMMIT) do |dbenv|
|
||||
SBDB::Env.new( @conf[:home],
|
||||
log_config: SBDB::Env::LOG_IN_MEMORY | SBDB::Env::LOG_AUTO_REMOVE,
|
||||
flags: SBDB::CREATE | SBDB::Env::INIT_TXN | Bdb::DB_INIT_MPOOL) do |dbenv|
|
||||
info :open => Rotate
|
||||
@serv.dbs = Rotate.new dbenv[ 'rotates.db', :type => SBDB::Btree, :flags => SBDB::CREATE | Bdb::DB_AUTO_COMMIT]
|
||||
retries = Retries.new *@conf[:retries]
|
||||
info :run => @serv
|
||||
@serv.run
|
||||
end
|
||||
|
|
|
@ -1,51 +0,0 @@
|
|||
# Generated by jeweler
|
||||
# DO NOT EDIT THIS FILE DIRECTLY
|
||||
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = %q{syslog2logan}
|
||||
s.version = "0.0.2"
|
||||
|
||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||
s.authors = ["Denis Knauf"]
|
||||
s.date = %q{2010-03-02}
|
||||
s.default_executable = %q{s2l.rb}
|
||||
s.description = %q{Syslog-Server which logs to Berkeley Databases (No SyslogDaemon)}
|
||||
s.email = %q{Denis.Knauf@gmail.com}
|
||||
s.executables = ["s2l.rb"]
|
||||
s.extra_rdoc_files = [
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
]
|
||||
s.files = [
|
||||
"README.md",
|
||||
"VERSION",
|
||||
"bin/s2l.rb"
|
||||
]
|
||||
s.homepage = %q{http://github.com/DenisKnauf/syslog2logan}
|
||||
s.rdoc_options = ["--charset=UTF-8"]
|
||||
s.require_paths = ["bin"]
|
||||
s.rubygems_version = %q{1.3.5}
|
||||
s.summary = %q{Syslog-Server}
|
||||
|
||||
if s.respond_to? :specification_version then
|
||||
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
||||
s.specification_version = 3
|
||||
|
||||
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
||||
s.add_runtime_dependency(%q<sbdb>, [">= 0"])
|
||||
s.add_runtime_dependency(%q<robustserver>, [">= 0"])
|
||||
s.add_runtime_dependency(%q<select>, [">= 0"])
|
||||
else
|
||||
s.add_dependency(%q<sbdb>, [">= 0"])
|
||||
s.add_dependency(%q<robustserver>, [">= 0"])
|
||||
s.add_dependency(%q<select>, [">= 0"])
|
||||
end
|
||||
else
|
||||
s.add_dependency(%q<sbdb>, [">= 0"])
|
||||
s.add_dependency(%q<robustserver>, [">= 0"])
|
||||
s.add_dependency(%q<select>, [">= 0"])
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in a new issue