mossplix has quit [Remote host closed the connection]
al2o3-cr has joined #ruby
lightstalker has quit [Ping timeout: 260 seconds]
lightstalker has joined #ruby
<adam12>
AndreYuhai: What happens with only a few threads?
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
<AndreYuhai>
adam12, you mean only using HTTP like in the dpaste link?
<adam12>
AndreYuhai: you're opening 200 threads for 200 connections. I'm saying, what happens if you just do like 3-5 threads.
<adam12>
AndreYuhai: This sounds like a server issue and not a Ruby issue, unless you were retrying. 503 is either a throttle or you've possibly depleted a worker pool.
banisterfiend has joined #ruby
banisterfiend has quit [Remote host closed the connection]
<AndreYuhai>
adam12, As long as I am using only HTTP like in the dpaste link it any number of threads work, but when I try the wrapper then I get 503 even with 5 threads.
<adam12>
AndreYuhai: Sorry I'm not following.
<AndreYuhai>
adam12, oh thank you anyway. :) This is really weird haha. Their back-end is really bad anyway so I am not surprised.
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drincruz has joined #ruby
cthulchu_ has quit [Read error: Connection reset by peer]
cthulchu_ has joined #ruby
znz_jp has quit [Remote host closed the connection]
BSaboia has quit [Quit: This computer has gone to sleep]
robotmay has quit [Quit: No Ping reply in 180 seconds.]
<havenwood>
adam12: A small connection pool of persistent connections would be ideal.
<havenwood>
adam12: Oops, MT.
<havenwood>
AndreYuhai: ^^
<havenwood>
adam12: You already know that, haha. Autocomplete fail.
<AndreYuhai>
havenwood, but in the case of using proxies?
robotmay has joined #ruby
znz_jp has joined #ruby
<havenwood>
AndreYuhai: That doesn't seem like a problem.
<AndreYuhai>
havenwood, alright thank you, I will try that and be back here.
<havenwood>
AndreYuhai: HTTP.rb is nicely chainable, so you can just add a proxy at the HTTP.persistent step IIR.
ur5us has quit [Ping timeout: 244 seconds]
<havenwood>
AndreYuhai: It'd be done for you under the hood with a Typhoeus Hydra setup, if you prefer.
<AndreYuhai>
Oh I'd used connection pool before but then I don't know why I commented it out.
<AndreYuhai>
But there is one thing I wanna ask. If the connection is persistent, does not that mean connection alive?
sjwvuie has quit [Ping timeout: 272 seconds]
<AndreYuhai>
I mean connection: keep-alive sorry
<havenwood>
AndreYuhai: Yeah, a persistent connection stays alive.
<AndreYuhai>
But then if the IP is rotating how is it possible in this case?
<havenwood>
AndreYuhai: Then you use a connection pool, so you have multiple living connections.
CommunistWolf has quit [Ping timeout: 256 seconds]
<AndreYuhai>
Oh but the proxy ip is always the same.
<havenwood>
AndreYuhai: You'd for example have 19 conections, each with a different proxy IP, if I'm understanding your purpose.
bsdbandit-01 has quit [Quit: -a- Connection Timed Out]
bsdbandit-01 has joined #ruby
<havenwood>
AndreYuhai: You can pair a nice thread pool, like a Concurrent::ThreadPoolExecutor for jobs with a ConnectionPool for persistent connections.
<AndreYuhai>
havenwood, yes that's right. Since the proxy ip is always the same then that's OK. I just got confused with the IP rotation.
<havenwood>
AndreYuhai: Sec, lemme dig up some of my code that does this with the HTTP gem.
<havenwood>
AndreYuhai: I just extracted these parts from some of my code ^, but hopefully it makes sense in isolation. ;)
<havenwood>
AndreYuhai: Note how each connection has settings.
<havenwood>
AndreYuhai: (You can avoid this bit-lower-level code with Typhoeus.)
<havenwood>
AndreYuhai: Or HTTP with ConnectionPool and Concurrent work great.
CommunistWolf has joined #ruby
<havenwood>
You just have to think about these things.
<AndreYuhai>
Yes, I see. Thank you! By the way, I just wonder, what's the purpose of the alias? :D
<AndreYuhai>
I mean connect instead of connection_pool
<AndreYuhai>
isn't that ambiguous?
<havenwood>
AndreYuhai: It was just specific to my code. I copied these parts out quickly without much pruning.
<AndreYuhai>
Oh yea alright haha. Thank you :)
wymillerlinux has quit [Ping timeout: 256 seconds]
<AndreYuhai>
I will try that now.
SeepingN has joined #ruby
CommunistWolf has quit [Ping timeout: 244 seconds]
dfucci has joined #ruby
AndreYuhai has quit [Quit: Leaving]
dfucci has quit [Ping timeout: 272 seconds]
ur5us has joined #ruby
anandprabhu has joined #ruby
sjwvuie has joined #ruby
anandprabhu has quit [Quit: Leaving]
CommunistWolf has joined #ruby
tau has joined #ruby
tau has joined #ruby
anandprabhu has joined #ruby
tau has quit [Remote host closed the connection]
drincruz has quit [Ping timeout: 272 seconds]
nebiros has joined #ruby
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
<adam12>
havenwood: ohai
anandprabhu has quit [Ping timeout: 246 seconds]
gix has quit [Ping timeout: 272 seconds]
<apteryx>
hello Ruby! I asked some time ago, but didn't get many answers: how should a package manager builder script proceed to build a gem? Using 'rake', or using 'gem build package.gemspec' ??
<apteryx>
(i.e., what is the most general/bullet proof way to build a gem?)
<adam12>
apteryx: Probably better luck using gem build gemspec
<apteryx>
Currently we use 'gem build package-name.gemspec', which seem to work for any Ruby package, but if someone tell me 'rake' would do just as good or better, I'd be happy to switch as it seems to handle tests slightly better.
<adam12>
apteryx: rake with a build task isn't ubiquitous.
<TheBrayn>
I'm pretty sure the 3rd block's behaviour is because you end the penultimate line with a -%> instead of just %> which gets rid of the newline
<TheBrayn>
I'd look into -%> vs %> but I'm not 100% sure anymore how they differ in which places
<user1212313>
thebrayn: Okay that works but when the @postrotate is false then the third block as a empty line and then }
<user1212313>
is there a way to prevent that empty line?
<user1212313>
that's what it looks like when the variable is false
TomyWork has joined #ruby
arzWZM has joined #ruby
<user1212313>
also wonder why the arr.each method second value isn't indented correctly
anandprabhu has joined #ruby
ur5us has joined #ruby
snickers_ has joined #ruby
snickers has quit [Ping timeout: 246 seconds]
chalkmonster has quit [Quit: WeeChat 2.8]
mossplix has quit [Remote host closed the connection]
postmodern has quit [Remote host closed the connection]
mossplix has joined #ruby
alfiemax has quit [Remote host closed the connection]
lmat has quit [Ping timeout: 256 seconds]
mossplix_ has joined #ruby
user1212313 has quit [Ping timeout: 245 seconds]
lmat has joined #ruby
mossplix has quit [Ping timeout: 272 seconds]
arzWZM has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
arzWZM has joined #ruby
schne1der has joined #ruby
oddp has joined #ruby
robotmay has joined #ruby
Furai has quit [Quit: WeeChat 2.8]
Furai has joined #ruby
snickers_ has quit [Ping timeout: 246 seconds]
fercell has joined #ruby
TvL2386 has joined #ruby
TvL2386_ has quit [Ping timeout: 256 seconds]
alfiemax has quit [Remote host closed the connection]
giorgian has joined #ruby
GodFather has quit [Remote host closed the connection]
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
anandprabhu has quit [Ping timeout: 246 seconds]
nebiros has left #ruby [#ruby]
BSaboia has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
cnsvc has quit [Ping timeout: 240 seconds]
fercell has quit [Quit: WeeChat 2.8]
fercell has joined #ruby
mossplix_ has quit [Remote host closed the connection]
markoong has joined #ruby
donofrio has joined #ruby
markoong is now known as kongmar
kongmar is now known as margeas
margeas is now known as markoong
markoong has quit [Client Quit]
markoong has joined #ruby
markoong has quit [Client Quit]
markoong has joined #ruby
chalkmonster has joined #ruby
chalkmonster has quit [Client Quit]
kinduff has quit [Read error: Connection reset by peer]
kinduff has joined #ruby
alfiemax has joined #ruby
BSaboia has joined #ruby
dfucci has joined #ruby
mossplix has joined #ruby
anandprabhu has joined #ruby
anandprabhu has quit [Client Quit]
ur5us has quit [Ping timeout: 244 seconds]
alfiemax has quit [Remote host closed the connection]
BSaboia has quit [Quit: This computer has gone to sleep]
BSaboia has joined #ruby
TCZ has joined #ruby
lmat has quit [Ping timeout: 246 seconds]
Fusl has quit [Max SendQ exceeded]
snickers has joined #ruby
Fusl has joined #ruby
fercell has quit [Read error: Connection reset by peer]
FetidToot has quit [Quit: Ping timeout (120 seconds)]
FetidToot has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
lmat has joined #ruby
arooni_team_b has joined #ruby
arooni has quit [Ping timeout: 256 seconds]
Guest48 has joined #ruby
alfiemax has joined #ruby
banisterfiend has joined #ruby
alfiemax has quit [Read error: No route to host]
alfiemax has joined #ruby
Guest48 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 246 seconds]
drincruz has joined #ruby
Guest48 has joined #ruby
nebiros has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
sarna has joined #ruby
Guest48 has quit [Client Quit]
GodFather has joined #ruby
drincruz has quit [Ping timeout: 272 seconds]
BSaboia has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
BSaboia has joined #ruby
BSaboia has quit [Client Quit]
jenrzzz has joined #ruby
BSaboia has joined #ruby
mossplix has quit [Remote host closed the connection]
burningserenity has joined #ruby
camilasan has quit [Ping timeout: 240 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
drincruz has joined #ruby
camilasan has joined #ruby
burningserenity has quit [Ping timeout: 260 seconds]
BSaboia has joined #ruby
drincruz has quit [Ping timeout: 260 seconds]
bmurt has joined #ruby
bmurt has quit [Client Quit]
drincruz has joined #ruby
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
mossplix has joined #ruby
alexherbo2 has quit [Ping timeout: 265 seconds]
burningserenity has joined #ruby
snickers has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
sarna has quit [Quit: Connection closed]
fercell has joined #ruby
AndreYuhai has joined #ruby
<AndreYuhai>
havenwood, yesterday I wanted to ask you about persistent connections but I couldn't explain. Now I figured out. What I wanted to ask you was, I am using proxies like HTTP.via(*proxy)...