« Back to channel list

#RubyOnRails - 05 August 2019

« Back 1 day Forward 1 day »
[00:06:29] skryking_: has joined #RubyOnRails
[00:25:18] ascarter: has joined #RubyOnRails
[00:39:19] alxgsv: has joined #RubyOnRails
[00:41:33] borpops: has joined #RubyOnRails
[00:42:37] borpops: Hey there. I have a requirement that whenever one of my models is saved, I need to call an external api to sync up a web service with the model. Where does this fit into rails? Is it a good idea to put that logic in the after_save callback?
[00:43:10] borpops: or at least if the api call is made in a worker/service object, is it okay to kick that off in the after_save callback?
[00:43:31] borpops: i've heard some mixed opinions on this type of thing
[01:22:07] dviola: these #like_owner?, #collaborator? methods expect a loop of some sort, so a bit difficult
[01:22:20] dviola: to get rid of the each
[01:47:50] duderonomy: has joined #RubyOnRails
[02:12:30] hive-mind: has joined #RubyOnRails
[02:25:54] Saukk: has joined #RubyOnRails
[02:43:48] MasterAsia: has joined #RubyOnRails
[02:44:01] MasterAsia: is there an easy way to count the amount of queries per request?
[02:44:09] MasterAsia: I'm having to count them manually in the log
[02:44:16] MasterAsia: this is for an api endpoint
[02:44:35] Tempesta: has joined #RubyOnRails
[02:59:20] unixcat: has joined #RubyOnRails
[03:04:10] MasterAsia: has joined #RubyOnRails
[04:04:50] Exuma: has joined #RubyOnRails
[04:18:18] _aeris: has joined #RubyOnRails
[04:24:53] uks: has joined #RubyOnRails
[04:34:35] duderonomy: has joined #RubyOnRails
[05:01:54] ascarter: has joined #RubyOnRails
[05:03:52] quazimodo: has joined #RubyOnRails
[05:14:37] uranoss: has joined #RubyOnRails
[05:17:18] srinidhi: has joined #RubyOnRails
[05:20:33] Exuma: has joined #RubyOnRails
[05:36:21] srinidhi: has joined #RubyOnRails
[06:13:29] s00pcan: has joined #RubyOnRails
[06:17:48] crankharder: has joined #RubyOnRails
[06:19:17] Aherin: has joined #RubyOnRails
[06:39:40] srinidhi: has joined #RubyOnRails
[06:43:35] Intelo: has joined #RubyOnRails
[06:43:37] Intelo: If I have intellij Idea and want to develop in ruby. I do not need rubymine and just a FREE plugin to be installed in idea? Correct?Is idea EAP free for ever?
[06:49:47] za1b1tsu: has joined #RubyOnRails
[06:52:03] kapilp: has joined #RubyOnRails
[06:58:32] prestorium: has joined #RubyOnRails
[07:03:41] Ergo: has joined #RubyOnRails
[07:16:55] corellian: has joined #RubyOnRails
[07:33:37] Dbugger: has joined #RubyOnRails
[07:47:52] deepredsky: has joined #RubyOnRails
[07:48:13] ellcs: has joined #RubyOnRails
[07:56:16] Aherin: has joined #RubyOnRails
[08:04:54] deepreds1: has joined #RubyOnRails
[08:13:39] Dbugger: has joined #RubyOnRails
[08:14:36] lxsameer: has joined #RubyOnRails
[08:17:27] corellian: has joined #RubyOnRails
[08:27:51] alxgsv: has joined #RubyOnRails
[08:54:57] alxgsv1: has joined #RubyOnRails
[09:22:43] Aherin: has joined #RubyOnRails
[09:27:53] Aherin: has joined #RubyOnRails
[09:45:20] Aherin: has joined #RubyOnRails
[09:46:30] Sylario: has joined #RubyOnRails
[11:40:43] lankanmon: has joined #RubyOnRails
[11:47:43] kapilp: has joined #RubyOnRails
[11:51:26] za1b1tsu: has joined #RubyOnRails
[12:09:36] deepredsky: has joined #RubyOnRails
[12:43:03] deepreds1: has joined #RubyOnRails
[13:23:38] algun: has joined #RubyOnRails
[13:24:24] algun: Does anyone know how to use temporary tables with names set at run-time?
[13:24:47] algun: I need a new temporary table with a unique name for each new request.
[13:25:01] algun: I need a new temporary table with a unique name for each new request to the method of the controller
[13:26:25] tdy: has joined #RubyOnRails
[13:26:49] dionysus69: has joined #RubyOnRails
[13:41:59] ascarter: has joined #RubyOnRails
[13:44:33] algun: Let me try again: How should I approach using a dynamically-created (named-at-runtime) table?
[13:45:36] srinidhi: has joined #RubyOnRails
[13:47:32] ascarter_: has joined #RubyOnRails
[13:51:36] srinidhi: has joined #RubyOnRails
[13:57:17] ascarter: has joined #RubyOnRails
[14:05:54] fcser_: has joined #RubyOnRails
[14:13:27] KeyJoo: has joined #RubyOnRails
[14:14:52] gheegh: has joined #RubyOnRails
[14:19:56] gheegh: Hey all.. I'm wondering if anyone knows of any guide on best practices for jobs that "retrieve data"? I have a system that's doing hundreds of thousands of jobs.. occasionally.. my Sidekiq job gets locked up.. and then re-queues itself, then it just seems to cascade.. what i need is a clean Timeout that will, after a fixed period of time, re-queue to a problem queue. Over the course of a day, it will lock up all my worker
[14:19:56] gheegh: threads and everything is dead. Thoughts?
[14:20:33] srinidhi: has joined #RubyOnRails
[14:24:42] GodFather_: has joined #RubyOnRails
[14:25:04] GodFather: has joined #RubyOnRails
[14:33:03] Linell: gheegh: could you raise an exception in your code as a timeout?
[14:33:42] gheegh: yeah, but Sidekiq writes all over their code base not to use Timeout because it's not thread safe.
[14:34:09] gheegh: to timeout the underlying process, retrieve, etc. which i've done.. but there are still some case where it locks the thread..
[14:36:05] Linell: I don't know then
[14:52:19] ascarter: has joined #RubyOnRails
[15:14:57] srinidhi: has joined #RubyOnRails
[15:15:09] GodFather: has joined #RubyOnRails
[15:15:23] GodFather_: has joined #RubyOnRails
[15:17:52] Ryctolagus: has joined #RubyOnRails
[15:34:23] za1b1tsu: has joined #RubyOnRails
[15:35:04] psmolen: has joined #RubyOnRails
[15:35:32] srinidhi: has joined #RubyOnRails
[16:01:13] Intelo: has joined #RubyOnRails
[16:16:04] shenghi: has joined #RubyOnRails
[16:20:51] conta1: has joined #RubyOnRails
[16:38:08] duderonomy: has joined #RubyOnRails
[17:11:07] duderonomy: has joined #RubyOnRails
[17:17:15] tdy: has joined #RubyOnRails
[17:19:00] duderonomy: has joined #RubyOnRails
[17:25:57] srinidhi: has joined #RubyOnRails
[17:31:07] quazimodo: this migt be super dumb
[17:31:15] quazimodo: but why are future migrations in the 'up' direction
[17:31:24] quazimodo: it makes no sense to me
[17:31:55] quazimodo: i'm missing some important model
[17:35:59] Exuma: has joined #RubyOnRails
[17:49:08] kapilp: has joined #RubyOnRails
[17:49:31] ascarter: has joined #RubyOnRails
[17:51:01] duderonomy: has joined #RubyOnRails
[18:07:14] shenghi: has joined #RubyOnRails
[18:24:58] Linell: because you're going "up" another version
[18:30:51] Intelo: has joined #RubyOnRails
[18:48:22] jorrin2: has joined #RubyOnRails
[18:59:26] Exagone313: has joined #RubyOnRails
[19:01:47] alxgsv: has joined #RubyOnRails
[19:27:54] ellcs: has joined #RubyOnRails
[19:49:41] tdy: has joined #RubyOnRails
[19:50:36] byteflam1: has joined #RubyOnRails
[20:13:07] linuus[m]: has joined #RubyOnRails
[20:29:51] walidvb: has joined #RubyOnRails
[20:30:57] walidvb: trying to test a controller, but getting an "wrong number of arguments (given 2, expected 0)" error, thrown on the controller's action
[20:31:45] walidvb: what am i doing wrong here?? https://gist.github.com/walidvb/c0e98e7fbc44739358621e7c0c996d3c
[20:34:39] ellcs: has joined #RubyOnRails
[20:35:26] ellcs: has joined #RubyOnRails
[20:37:57] walidvb: pardon my asking like this, been on this for a while now -.-
[20:38:23] za1b1tsu: has joined #RubyOnRails
[20:40:44] Linell: I honestly don't see anything that stands out as wrong
[20:41:08] Linell: have you tried putting any puts or something throughout to see if you're it's dying where you think it is?
[20:43:36] walidvb: Linell: i just did, and it looks like my before_actions are being passed to the controller
[20:44:08] Linell: that's weird
[20:45:13] walidvb: it prints my callback's name, then halted_callback_hook+my callback name 🤔
[20:46:09] walidvb: Linell: https://cl.ly/6fc2f4f2d4fd
[20:47:06] Linell: I'm not sure how to help at all sadly, I'm just a bad programmer and debug with puts a lot lol
[20:47:33] Linell: try to put another puts on after line seven though, adn then one more inside of the if can?
[20:47:47] Linell: just to see if it's actually making it through your controller
[20:48:53] walidvb: yeah, i tried that, it does
[20:49:22] Linell: hmm... that makes me think think the problem may be in the test itself?
[20:50:14] walidvb: i'd assume so..
[20:54:10] walidvb: could be in the controller, though. sending a request doesn't seem to help
[20:55:03] Linell: Hmm... try a puts below the post in your test?
[20:56:58] walidvb: sry, misexpressed myself. i tried to send a real life request, and i'm getting that error
[20:57:53] Linell: ahhhhh I gotcha
[20:58:00] Linell: I wish I could help more
[20:58:04] walidvb: yep. `send` was the issue. seems like it's a reserved word
[20:58:14] walidvb: changed it to `send_emails`, error gone
[20:58:14] Linell: ahhh that'd do it
[20:58:17] walidvb: 🤷🏼‍♂️
[20:58:20] Linell: sorry I didn't catch that, I should've!
[20:58:37] walidvb: do you know why?
[20:58:47] Linell: Why it's a reserved word?
[21:01:56] walidvb: i can't seem to find it as a method of ActionController::API
[21:02:05] Linell: https://apidock.com/ruby/Object/send
[21:03:27] walidvb: reserved keywork of ruby, lol... i didn't even go that deep, but is obvious now, indeed ^^
[21:03:35] walidvb: thanks Linell :)
[21:04:34] Linell: I'm glad you could get it figured out!
[21:13:55] admin123: has joined #RubyOnRails
[21:15:26] tf2ftw: has joined #RubyOnRails
[21:16:09] duderono_: has joined #RubyOnRails
[21:22:03] duderonomy: has joined #RubyOnRails
[21:53:09] ellcs: has joined #RubyOnRails
[21:53:40] ellcs: has joined #RubyOnRails
[21:54:00] ellcs: has joined #RubyOnRails
[22:07:25] maloik: has joined #RubyOnRails
[22:17:10] MrCrackPot: has joined #RubyOnRails
[22:39:21] duderonomy: has joined #RubyOnRails
[23:02:27] duderonomy: has joined #RubyOnRails
[23:05:24] duderonomy: has joined #RubyOnRails
[23:33:54] mheld: has joined #RubyOnRails
[23:35:37] duderonomy: has joined #RubyOnRails