LOL, thanks for your response. Regards Pablo On Fri, Oct 17, 2014 at 1:26 PM, [email protected] <[email protected]> wrote:
> [email protected] and me are almost the same persons. (i have a > dissociative identity disorder) > > Hi. I've made such module long time ago, but I didn't release it in Cpan > (so u can only download a tar.gz ) and abandoned it. > http://search.cpan.org/~alexbyk/MojoX-IOLoop-Throttle-0.01_26/ (works > only with mojo ~2.68). > > Because it was my first program written in perl, I can't recommend it for > usage. Also it's not working with the latest version of Mojolicious, and > after that I've got a better idea how to do the same thing. > > So can't help you, but hope U'll find smthng that suits your case > > Hi [email protected] one quick question. > > I'm facing the same problem that you faced a long time ago, where you > able to create or use a different module to throttle mojolicious requests? > > Thanks in advantage. > Pablo > > On Sunday, January 29, 2012 8:50:22 AM UTC-3, [email protected] wrote: >> >> Or maybe... Is there a ready-made module with functionality like this : >> >> >> # Try to do not more than 100 req./minute. >> # And allow not more than 4 reqs at once(online) >> >> my $l = Mojo::IOLoop::SomeLimiter->new( >> period => 60, # 1 minute >> limit => 100, # 100/minute >> limit_online => 4 >> ); >> >> >> $l->on( >> process => sub { >> >> my $l = shift; >> if (my $d = shift @domains) { >> >> mywhois($d => sub { >> ... process answers ... >> >> # request processed, increase number and decrease online >> $l->finish(); >> }); >> >> } >> else { >> # all domains processed. Stop timers >> $l->stop(); >> } >> } >> ); >> > -- > You received this message because you are subscribed to the Google Groups > "Mojolicious" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/mojolicious. > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "Mojolicious" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/mojolicious. > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to the Google Groups > "Mojolicious" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/mojolicious. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
