Permalink
Browse files

conflict

  • Loading branch information...
1 parent eb82cb1 commit ad8da80e51cd0b909ee2bbe6f365d7170cc742f0 @purzelrakete purzelrakete committed Jan 31, 2012
Showing with 14 additions and 7 deletions.
  1. +3 −0 CHANGELOG.md
  2. +11 −7 bin/lhm-kill-queue
View
@@ -1,3 +1,6 @@
+# 1.0.0.rc5 (January 30, 2012)
+
+* moved scripts into bin, renamed, added to gem binaries
# 1.0.0.rc4 (January 29, 2012)
View
@@ -46,36 +46,40 @@ module Lhm
end
end
- private
-
def kill
- lock_process_id = trip
- puts "killing lock process #{ lock_process_id }."
- kill_process(lock_process_id)
+ lock = trip
+ puts "killing lock process #{ lock }."
+ kill_process(lock)
end
def master
+ lock = trip
puts "starting to kill non lhm processes in 1 second"
sleep(1)
list_non_lhm.each do |process|
- puts "killing other process #{ process }."
+ puts "killing read process #{ process }."
kill_process(process)
+ sleep(0.05)
end
end
def slave
+ lock = trip
puts "starting to kill non lhm select processes in 1 second"
sleep(1)
list_non_lhm.each do |process|
if(select?(process))
puts "killing read process #{ process }."
kill_process(process)
+ sleep(0.05)
end
end
end
+ private
+
def connect
ActiveRecord::Base.establish_connection({
:adapter => 'mysql',
@@ -92,7 +96,7 @@ module Lhm
end
def list_non_lhm
- select_process("info not like '-- lhm' and time > 0")
+ select_process("info not like '-- lhm' and time > 0 and state != 'sleep'")
end
def trip

0 comments on commit ad8da80

Please sign in to comment.