havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.7.1, 2.6.6, 2.5.8: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
va5c0 has joined #ruby
va5c0 has quit [Quit: WeeChat 2.9]
schne1der has quit [Ping timeout: 240 seconds]
elcuervo has quit [Read error: Connection reset by peer]
elcuervo has joined #ruby
adu has quit [Quit: adu]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
akem has joined #ruby
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
Rudd0 has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
duderonomy has joined #ruby
akem has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
ChmEarl has quit [Quit: Leaving]
drincruz has joined #ruby
dputtick has quit [Ping timeout: 260 seconds]
CustosLimen has quit [Ping timeout: 240 seconds]
clinth has quit [Read error: Connection reset by peer]
dputtick has joined #ruby
clinth has joined #ruby
CustosLimen has joined #ruby
drincruz has quit [Ping timeout: 272 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
zipzapzapzip has joined #ruby
carbone5 has joined #ruby
dhollinger has quit [Ping timeout: 256 seconds]
dhollinger has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
carbone5 has quit [Quit: carbone5]
lxsameer has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
jordanm has quit [Read error: Connection reset by peer]
jordanm has joined #ruby
wallace_mu has quit [Ping timeout: 256 seconds]
zipzapzapzip has quit [Quit: Leaving]
ur5us has quit [Ping timeout: 260 seconds]
zacts has joined #ruby
ur5us has joined #ruby
jordanm has quit [Remote host closed the connection]
jordanm has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
braj has quit []
ur5us has quit [Ping timeout: 260 seconds]
zacts has quit [Ping timeout: 272 seconds]
Rudd0 has joined #ruby
swaggboi has quit [Quit: C-x C-c]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 258 seconds]
swaggboi has joined #ruby
dualfade has quit [Ping timeout: 260 seconds]
dualfade has joined #ruby
_whitelogger has joined #ruby
chouhoulis has quit [Remote host closed the connection]
bocaneri is now known as Sauvin
alfiemax has joined #ruby
cnsvc has quit [Quit: WeeChat 2.9]
Rudd0 has quit [Ping timeout: 260 seconds]
cd has quit [Quit: cd]
alfiemax has quit [Ping timeout: 256 seconds]
endorama has quit [Ping timeout: 246 seconds]
endorama has joined #ruby
brainfunnel has joined #ruby
weaksauce has quit [Ping timeout: 272 seconds]
BSaboia has joined #ruby
AndreYuhai has joined #ruby
<AndreYuhai> Hey there, can I have one queue for two Sidekiq workers? Would they be able to pick up their own jobs.
ruurd has quit [Quit: ZZZzzz…]
chouhoulis has joined #ruby
Mia has joined #ruby
Xiti has joined #ruby
tuttzza has joined #ruby
_whitelogger has joined #ruby
<jhass> AndreYuhai: sure, as long as both run the same code. That's esssentially how do you do larger scaling with sidekiq
Caerus has quit [Ping timeout: 256 seconds]
Caerus has joined #ruby
dionysus69 has joined #ruby
jenrzzz has joined #ruby
<AndreYuhai> jhass, Why or when would I need to create two workers that run the same code? Why not just run one with more threads?
<AndreYuhai> jhass, In my case I have workers doing different things. I was wondering whether they can work on the same queue.
<jhass> they could run on separate machines for example
supercoven has joined #ruby
<AndreYuhai> jhass, Oh that's right.
<yxhuvud> I believe any worker for a queue is supposed to be able to handle all jobs on that queue.
<AndreYuhai> I thought maybe there is a way to differentiate jobs for the workers so they only pick their jobs :D
<jhass> but sometimes you also get better performance from scaling processes instead of threads (due to things like lock contention)
<jhass> or you simply want some redundancy
<AndreYuhai> yxhuvud, That's what I thought
<jhass> in case one crashes
<yxhuvud> That is possible. It is called a Queue.
<AndreYuhai> yxhuvud, yes but is it possible for Sidekiq, like a feature?
<jhass> yeah, the point of queues, besides prioritization, is so you could have disjoint worker code, though I would not recommend it, it's easy to get wrong
<yxhuvud> so if you want them separate, you create multiple queues and configure the workers to only pick up jobs from the queues they care about
jenrzzz has quit [Ping timeout: 256 seconds]
<jhass> there's non Ruby sidekiq worker implementations, so you could have non-Ruby jobs, but that's about the only legit scenario I see for running different worker code
<AndreYuhai> Yes, now I have two workers each working on its own queue. I was just wondering whether that's possible two make them work on the same queue or when we would need that.
<jhass> it's your idea, I don't know :D
<jhass> (it's not possible, talking about the need part)
<yxhuvud> jhass: well there are some cases I can think of, mostly to do with sidekiq extensions.
supercoven has quit [Max SendQ exceeded]
supercoven has joined #ruby
braincrash has joined #ruby
lxsameer has joined #ruby
supercoven has quit [Max SendQ exceeded]
supercoven has joined #ruby
brianj has joined #ruby
<brianj> Um how do I check if an element is present in a hash? I tried #include? and #member? Im looking at the docs at https://ruby-doc.org/core-2.6.3/Hash.html and i dont see which one to use..
<jhass> brianj: a key, a value or a specific combination?
<jhass> has_key?/member?/include? are all aliases fwiw
<jhass> and key?
<brianj> jhass: {1 => 2, 5 => 9}.member? 1 => 2 # false
<brianj> jhass: I need a method that returns true..
<jhass> &>> {1 => 2, 5 => 9}.member? 1
<rubydoc> # => true (https://carc.in/#/r/9qgu)
<jhass> so specific pair
<brianj> jhass: yeah but I need the specific pair..
<jhass> just hash[1] == 2
<jhass> &>> {1 => 2, 5 => 9}[1] == 2
<rubydoc> # => true (https://carc.in/#/r/9qgv)
<brianj> jhass: well yeah..but this is ruby..shouldnt I have a specific method for that?
<jhass> why?
<jhass> I guess you could .to_a.include?([1, 2]) but I would call that out in code review as being terribly inefficient
<brianj> jhass: well I need to check for existance of a specific kombination of of big hash.. would you then do if my_hash.has_key?(my_key) && my_hash[my_key] == my_value ?
<jhass> my `nil` a valid value in this scenario?
<brianj> as my_key / my_value ?
<jhass> as my_value
<jhass> and do you need to disambiguate the case of key => nil from existing in the hash or not
<brianj> my_value wont be nil
<jhass> so I'd just skip the has_key? part then
<jhass> if it's not present it'll return nil which will never == my_value
alfiemax has joined #ruby
<brianj> ok thanks. I dont understand why include? cant take a key pair..
<jhass> what you're passing is not a key pair, it's another hash of its own
<brianj> yeah
imode has quit [Ping timeout: 256 seconds]
<jhass> &>> {{1 => 2} => 0}.include?(1 => 2)
<rubydoc> # => true (https://carc.in/#/r/9qgw)
<brianj> jhass: or we have #has_key and has_value, why not a #has_key_pair or #has_member....
batisi[m] has left #ruby ["Kicked by @appservice-irc:matrix.org : Idle for 30+ days"]
<jhass> I guess it's a rare enough usecause (I never before had that need) and #[] == is succint enough
jenrzzz has joined #ruby
<jhass> https://bugs.ruby-lang.org/issues/10984 seems close enough
chouhoulis has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 272 seconds]
<jhass> &>> {1 => 2, 5 => 9} <= {1 => 2}
<rubydoc> # => false (https://carc.in/#/r/9qgx)
<jhass> &>> {1 => 2, 5 => 9} >= {1 => 2}
<rubydoc> # => true (https://carc.in/#/r/9qgy)
<jhass> well, who knew
kristian_on_linu has joined #ruby
hiroaki has joined #ruby
brainfunnel has quit [Quit: whoops]
dhollinger has quit [Ping timeout: 260 seconds]
dhollinger has joined #ruby
alfiemax has quit [Remote host closed the connection]
rippa has joined #ruby
chouhoulis has joined #ruby
Rudd0 has joined #ruby
ellcs has joined #ruby
Rudd0^ has joined #ruby
Rudd0 has quit [Ping timeout: 264 seconds]
ellcs has quit [Ping timeout: 260 seconds]
Rudd0 has joined #ruby
Rudd0^ has quit [Ping timeout: 258 seconds]
kith has joined #ruby
kith has quit [Client Quit]
exkith has joined #ruby
chouhoulis has quit [Remote host closed the connection]
phaul has quit [Ping timeout: 240 seconds]
rubydoc has quit [Ping timeout: 240 seconds]
rubydoc has joined #ruby
phaul has joined #ruby
Eiam has quit [Ping timeout: 244 seconds]
roshanavand has joined #ruby
akem has joined #ruby
dualfade has quit [Ping timeout: 265 seconds]
dualfade has joined #ruby
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
roshanavand_ is now known as roshanavand
flak has joined #ruby
rippa has quit [Ping timeout: 260 seconds]
<AndreYuhai> how do I get the 'Enqueued' jobs in sidekiq?
<AndreYuhai> RetrySet doesn't give me those
<AndreYuhai> Oh it's the queue itself. :D
Rudd0 has quit [Ping timeout: 246 seconds]
TCZ has joined #ruby
elcuervo has quit [Read error: Connection reset by peer]
elcuervo has joined #ruby
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 246 seconds]
roshanavand_ is now known as roshanavand
henninb has joined #ruby
henninb has quit [Client Quit]
henninb has joined #ruby
henninb has quit [Client Quit]
henninb has joined #ruby
chouhoulis has joined #ruby
jenrzzz has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
henninb has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 258 seconds]
wallace_mu has joined #ruby
cadeskywalker has quit [Ping timeout: 240 seconds]
jottr has joined #ruby
roshanavand_ has joined #ruby
cadeskywalker has joined #ruby
roshanavand has quit [Ping timeout: 260 seconds]
roshanavand_ is now known as roshanavand
dhollinger has quit [Ping timeout: 264 seconds]
dhollinger has joined #ruby
TCZ has quit [Quit: Leaving]
impermanence has quit [Quit: Connection closed]
Ashely3 has joined #ruby
Ashely3 has quit [Disconnected by services]
roshanavand has quit [Ping timeout: 256 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
brianj has quit []
schne1der has joined #ruby
howdoi has joined #ruby
TCZ has joined #ruby
AndreYuhai has quit [Remote host closed the connection]
alfiemax has joined #ruby
ChmEarl has joined #ruby
sevvie has quit [Remote host closed the connection]
sevvie has joined #ruby
jenrzzz has joined #ruby
ruurd has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
HeAvengin7_ has joined #ruby
HeAvengin7_ has quit [Quit: Please click my blog: https://bit.ly/2RjfReh or https://bit.ly/33tb5lx]
schne1der has quit [Ping timeout: 260 seconds]
m27frogy has quit [Quit: ZNC - https://znc.in]
m27frogy has joined #ruby
kent\n has quit [Remote host closed the connection]
kent\n has joined #ruby
davispuh has joined #ruby
akem_ has joined #ruby
akem__ has joined #ruby
akem has quit [Ping timeout: 256 seconds]
akem_ has quit [Ping timeout: 260 seconds]
dviola has joined #ruby
va5c0 has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
dhollinger has quit [Ping timeout: 272 seconds]
Rudd0 has joined #ruby
dhollinger has joined #ruby
va5c0 has quit [Ping timeout: 240 seconds]
creat has quit [Quit: ZNC - http://znc.in]
roshanavand has joined #ruby
creat has joined #ruby
chouhoulis has joined #ruby
howaboutyes has joined #ruby
howaboutyes1 has joined #ruby
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 264 seconds]
roshanavand_ is now known as roshanavand
roshanavand has quit [Client Quit]
roshanavand has joined #ruby
TCZ has quit [Quit: Leaving]
roshanavand has quit [Ping timeout: 260 seconds]
aandrew has left #ruby [#ruby]
weaksauce has joined #ruby
howaboutyes has quit [Quit: Leaving]
howaboutyes1 has quit [Quit: Leaving]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
kristian_on_linu has quit [Remote host closed the connection]
supercoven has quit [Ping timeout: 272 seconds]
ellcs has joined #ruby
jrfresh420 has joined #ruby
imode has joined #ruby
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
weaksauce has joined #ruby
alexherbo2 has joined #ruby
hiroaki has quit [Ping timeout: 272 seconds]
r29v has joined #ruby
r29v has quit [Client Quit]
jottr has quit [Quit: WeeChat 2.9]
ellcs has quit [Remote host closed the connection]
kristian_on_linu has joined #ruby
bambanx has joined #ruby
ellcs has joined #ruby
neshpion has joined #ruby
CrazyEddy has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 260 seconds]
flak has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
TCZ has joined #ruby
CrazyEddy has joined #ruby
ua has quit [Ping timeout: 272 seconds]
bambanx_ has joined #ruby
schne1der has joined #ruby
bambanx has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
vondruch has quit [Ping timeout: 256 seconds]
kristian_on_linu has quit [Remote host closed the connection]
teclator has quit [Remote host closed the connection]
ua has joined #ruby
ellcs has quit [Ping timeout: 244 seconds]
teclator has joined #ruby
bambanx_ has quit [Ping timeout: 264 seconds]
neshpion has left #ruby ["WeeChat 2.9"]
teclator has quit [Remote host closed the connection]
bambanx has joined #ruby
teclator has joined #ruby
dionysus69 has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
r34lp0w3r[m] has joined #ruby
ur5us has joined #ruby
TCZ has quit [Quit: Leaving]
cd has joined #ruby
FetidToot has quit [Quit: Ping timeout (120 seconds)]
FetidToot has joined #ruby
kristian_on_linu has joined #ruby
sagax has quit [Ping timeout: 272 seconds]
sleepee has joined #ruby
sleepee has quit [Client Quit]
kristian_on_linu has quit [Ping timeout: 256 seconds]
va5c0 has joined #ruby
kristian_on_linu has joined #ruby
chouhoulis has quit [Remote host closed the connection]
dionysus69 has quit [Quit: dionysus69]
jrfresh420 has quit [Quit: Connection closed for inactivity]
s3nd1v0g1us has joined #ruby
kristian_on_linu has quit [Remote host closed the connection]
howdoi has joined #ruby
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
dualfade has quit [Ping timeout: 272 seconds]
dualfade has joined #ruby
va5c0 has quit [Ping timeout: 260 seconds]
va5c0 has joined #ruby
va5c0 has quit [Ping timeout: 272 seconds]
joshcom has joined #ruby
joshcom has left #ruby ["Leaving"]