Skip to content

Commit

Permalink
增加批量导出和管道功能
Browse files Browse the repository at this point in the history
  • Loading branch information
LubyRuffy authored and LubyRuffy committed Oct 23, 2014
1 parent 466510f commit 2fd4051
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tools/dump_all_query.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env ruby
# 加入管道:
# RAILS_ENV=production ./dump_all_query.rb 'body="shownews.asp?id"' | ./query_processors/shownews_has_comment.rb
require 'yaml'
require 'json'
require 'erb'
Expand Down
2 changes: 1 addition & 1 deletion tools/query_processors/shownews_has_comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require 'thread/pool'
require 'net/http'

pool = Thread.pool(1)
pool = Thread.pool(100)

while (s = $stdin.gets)
pool.process(s.strip) {|h|
Expand Down

0 comments on commit 2fd4051

Please sign in to comment.