Displaying 1 result from an estimated 1 matches for "process_feed_chunk".
2005 Nov 04
0
Threads and Active Reccord
...l, like pre-fetch the accounts collection somehow?
Below is the code that''s being used to produce the problems:
<code>
# method run by controller
def check_all_feeds_and_create_tells
fill_feed_queue
sleep(1.minute)
checkers = (1..3).map do |i|
process_feed_chunk
end
end
private
def fill_feed_queue
last_at = 0
@queue = SizedQueue.new(10) # with a capacity for 10
# we do the queue filling in a single thread that runs until no more
items are left to add
Thread.new do
loop do
logger.debug("Fetching...