-
Notifications
You must be signed in to change notification settings - Fork 165
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
Run customerio in background #422
Conversation
d723db8
to
0a0f49b
Compare
0a0f49b
to
cd3fecc
Compare
cd3fecc
to
205dc18
Compare
I've tested this on staging and it works correctly. I'd like to give it a go on production soon. |
IMO it would be a good idea to put a sidekiq queue in between, so that this kind of slowdown does not have the potential to bring down the whole web dyno. |
I don't want to be obstructive, but I tend to agree with @igorwwwwwwwwwwwwwwwwwwww – we have Sidekiq running for cancellations and restarts in API anyway, so maybe we could just add another queue? |
That's what I would like to avoid as it's a lot of setup for such a simple call.
I think that this was changed at some point and all of the sidekiq jobs land in hub
|
2955a84
to
293173d
Compare
293173d
to
8b3cab8
Compare
8b3cab8
to
44115fc
Compare
f7929be
to
c62bd71
Compare
Thanks for the input. After thinking it through again I think that I was too optimistic about using threads directly. Other solutions not involving sidekiq, like creating a thread pool would complicate things and then why not just use sidekiq in the first place? |
I tested it on staging and it works correctly, so I'll probably give it a shot tomorrow if no one objects. |
c62bd71
to
f7145a4
Compare
At the moment we need to wait for a customerio's response in order to log a user in. I think that this might be causing problems for some users. I'm not 100% certain that this is customerio's problem, but I think that we should be running it in the background anyway. It's not crucial for signing in, so we shouldn't be making a handshake call longer than it needs to be. This commit creates a customerio worker, which will run the needed request using sidekiq.
f7145a4
to
f562ec9
Compare
From commit message: