Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Switched from backgroundrb to workling/starling.
- Loading branch information
Showing
190 changed files
with
2,377 additions
and
5,883 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# By default, NotRemoteRunner is used when RAILS_ENV == 'test'. | ||
# | ||
# You can pass options to memcached client by nesting the key value pairs | ||
# under 'memcache_options'. | ||
# | ||
# You can also use a cluster of Starlings. Simply give a comma separated | ||
# list of server:port, server:port, server:port values to listens_on. | ||
# | ||
production: | ||
listens_on: localhost:15151 | ||
|
||
development: | ||
listens_on: localhost:22122 | ||
|
||
test: | ||
listens_on: localhost:12345 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@routing = Workling::Routing::ClassAndMethodRouting.new | ||
unnormalized = REXML::Text::unnormalize(STDIN.read) | ||
message, command, args = *unnormalized.match(/(^[^ ]*) (.*)/) | ||
options = Hash.from_xml(args)["hash"] | ||
|
||
if workling = @routing[command] | ||
options = options.symbolize_keys | ||
method_name = @routing.method_name(command) | ||
|
||
workling.dispatch_to_worker_method(method_name, options) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
require 'pp' | ||
|
||
puts '=> Loading Rails...' | ||
|
||
require File.dirname(__FILE__) + '/../config/environment' | ||
require File.dirname(__FILE__) + '/../vendor/plugins/workling/lib/workling/remote/invokers/basic_poller' | ||
require File.dirname(__FILE__) + '/../vendor/plugins/workling/lib/workling/routing/class_and_method_routing' | ||
|
||
puts '** Rails loaded.' | ||
|
||
trap(:INT) { exit } | ||
|
||
client = Workling::Clients::MemcacheQueueClient.new | ||
|
||
begin | ||
client.connect | ||
client.reset | ||
|
||
client.stats # do this so that connection is shown as established below. | ||
|
||
puts "Queue state:" | ||
pp client.inspect | ||
pp "Active?: #{client.active?}" | ||
pp "Read Only?: #{client.readonly?}" | ||
puts "" | ||
puts "Servers:" | ||
pp client.servers | ||
puts "" | ||
puts "Queue stats:" | ||
pp client.stats | ||
|
||
puts "\nThread Stats:" | ||
pp Thread.list | ||
ensure | ||
puts '** Exiting' | ||
client.close | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env ruby | ||
require 'rubygems' | ||
require 'daemons' | ||
|
||
workling = File.join(File.dirname(__FILE__), '..', 'vendor', 'plugins', 'workling', 'script', 'listen.rb') | ||
options = { | ||
:app_name => "workling", | ||
:ARGV => ARGV, | ||
:dir_mode => :normal, | ||
:dir => File.join(File.dirname(__FILE__), '..', 'log'), | ||
:log_output => true, | ||
:multiple => false, | ||
:backtrace => true, | ||
:monitor => true | ||
} | ||
|
||
Daemons.run(workling, options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env ruby | ||
|
||
puts "\n>>>>>" | ||
puts ">>>>> This script has been DEPRACATED. Please use script/workling_client instead!" | ||
puts ">>>>>\n\n" | ||
|
||
load File.dirname(__FILE__) + '/workling_client' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.