-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Another way. #3
Comments
I see you're point. the I beleive that's the way it's done with regular Worker class. |
No, that not my point.
UserSyncer is litterally useless, since it run everything on the foreground |
right, I see what you're saying. |
I was thinking about |
no no... that doesn't solves the issue + I want the select(:id) to be part of the class logic. |
|
Plucking return an array. So plucking is much faster than select(:id), but still both are bad. I tested with User.active.to_sql then stripped the first part and put it back in a where(''), but i call it @seuros's bullshit programming. But so far it the fastest approach. |
@seuros i'm starting to think ManagerWorker shouldn't be running async at all. if you want to run more over, the way I currently use ManagerWorkers is calling thing from every 1.day do
runner 'UserSyncer.perform_query_async(User.active, :batch_size => 300)'
end so it's not an issue. class UserManagerRunnerWorker
include Sidekiq::Worker
def perform
UserSyncer.perform_query_async(User.active, :batch_size => 300)
end
end |
We have
In this example, we are not performing the query async. We have to find another way.
In fact, we are not even using Sidekiq.
The text was updated successfully, but these errors were encountered: