Last active
August 29, 2015 14:14
-
-
Save sclinede/8affb4ffa6713e7113f8 to your computer and use it in GitHub Desktop.
Revisions
-
sclinede revised this gist
Jul 24, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ bgkey = ::BgExecutor::Configuration[:redis][:namespace] + ':bg_executor:jobs_queue' job_name = 'worker:mail' # 'map_coord' # Test: result = [] -
sclinede revised this gist
Jul 24, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ # Test: result = [] ($redis.llen bgkey).times { |idx| p idx if idx % 100 == 0; val = ($redis.lindex bgkey, idx).to_s; result << val if val.include?(job_name) } # And Run: # result.each { |val| $redis.lrem bgkey, 0, val } # NOT ($redis.llen bgkey).times { |idx| val = ($redis.lindex bgkey, idx); $redis.lrem bgkey, 0, val if val.include?(job_name) } -
sclinede revised this gist
Jul 24, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,4 +6,5 @@ ($redis.llen bgkey).times { |idx| val = ($redis.lindex bgkey, idx).to_s; result << val if val.include?(job_name) } # And Run: # result.each { |val| $redis.lrem bgkey, 0, val } # NOT ($redis.llen bgkey).times { |idx| val = ($redis.lindex bgkey, idx); $redis.lrem bgkey, 0, val if val.include?(job_name) } -
sclinede renamed this gist
Feb 6, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
sclinede revised this gist
Feb 6, 2015 . 2 changed files with 9 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +0,0 @@ This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ bgkey = ::BgExecutor::Configuration[:redis][:namespace] + ':bg_executor:jobs_queue' job_name = 'map_coord' # Test: result = [] ($redis.llen bgkey).times { |idx| val = ($redis.lindex bgkey, idx).to_s; result << val if val.include?(job_name) } # And Run: # ($redis.llen bgkey).times { |idx| val = ($redis.lindex bgkey, idx); $redis.lrem bgkey, 0, val if val.include?(job_name) } -
sclinede created this gist
Feb 6, 2015 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ bgkey = 'pc4_production:bg_executor:jobs_queue' result = [] ($redis.llen bgkey).times { |idx| result << ($redis.lindex bgkey, idx) if ($redis.lindex bgkey, idx).include?('map_coord') } ($redis.llen bgkey).times { |idx| val = ($redis.lindex bgkey, idx); $redis.lrem bgkey, 0, val if val.include?('map_coord') } ($redis.llen bgkey).times { |idx| val = ($redis.lindex bgkey, idx).to_s; result << val if val.include?('map_coord') }