#RubyOnRails - 04 September 2018
« Back 1 day Forward 1 day »
[00:51:30]
orpl:
i've got a spec where i want to assert that calling some method calls another. Normally, `should_receive(:method_under_test).once` would be alright, but in the spec set up, :method_under_test is already being called once. what can I do to get around this? i was hoping for a change call count by 1 type of deal
[03:35:20]
mices:
well i found what had broken mailboxer it wasn't my code it was the difference between rails 5.0.0 and 5.0.1
[04:40:10]
mices:
emmezeta probably to comply with the validations in the models that control access to the database
[07:44:39]
Applitect:
Can anyone tell me how I can use find_by on a model to search for ids from an array? So the sql would be something like WHERE id IN (23, 45, 132). But I'd like to know the best way to pull this off in ruby / rails
[08:05:53]
dionysus69:
so I was reading this https://dockyard.com/blog/2016/08/09/phoenix-channels-vs-rails-action-cable
[08:06:26]
dionysus69:
in my app I am sending making 5+ broadcasts per second hypothetically to all users
[08:07:10]
dionysus69:
what should I expect, when will I see unacceptable performance and what can I do to improve it?
[08:09:53]
dionysus69:
I could artificially lower the frequency to like 5 broadcasts per 3/4/5 seconds but lower the better, still it's not a solution if I hypothetically get 10k users on that page
[08:11:03]
sevenseacat:
without knowing anything at all about your app, or your infrastructure, its impossible to give any guidance about what your performance might be like
[08:11:54]
dionysus69:
I use DO dropplets, 4 core cpu 8gb ram if that helps :D single app server atm but planning on expanding in near future when I have time
[08:14:55]
dionysus69:
sevenseacat: ok one last thing then, how do people test these stuff? I dont think opening 500 tabs would be the way
[16:14:19]
aesthetikx:
that will tell you how many connections you need to db / redis actually, memory should be more like puma workers yeah