Load queries asynchronously to leverage concurrency
This commit is contained in:
@@ -12,9 +12,9 @@ class BubblesController < ApplicationController
|
|||||||
RECENTLY_POPPED_LIMIT = 100
|
RECENTLY_POPPED_LIMIT = 100
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@considering_bubbles = @filter.bubbles.considering
|
@considering_bubbles = @filter.bubbles.considering.load_async
|
||||||
@doing_bubbles = @filter.bubbles.doing
|
@doing_bubbles = @filter.bubbles.doing.load_async
|
||||||
@popped_bubbles = @filter.with(indexed_by: "popped").bubbles.limit(RECENTLY_POPPED_LIMIT)
|
@popped_bubbles = @filter.with(indexed_by: "popped").bubbles.limit(RECENTLY_POPPED_LIMIT).load_async
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|||||||
Reference in New Issue
Block a user