dotandimet / Mojo-UserAgent-Role-Queued

A role for Mojo::UserAgent that processes non-blocking requests in a rate-limiting queue.
Other
3 stars 2 forks source link

Errors when running with EV backend #3

Closed dotandimet closed 6 years ago

dotandimet commented 6 years ago

Reported by tyldis via irc:

I wanted to use it, but even the example in the synopsis isn't working for me. https://pastebin.com/8veqfYB9 My short testing seems to indicate that issues arise as the queue grows past max_active This was on Mojo 7.90-7.94

The pastebin output looks like this:

Page at https://mojolicious.io/ is titled: Welcome To mojolicious.io! - mojolicious.io Page at https://mojolicious.io/ is titled: Welcome To mojolicious.io! - mojolicious.io Page at https://mojolicious.io/ is titled: Welcome To mojolicious.io! - mojolicious.io Page at https://mojolicious.io/ is titled: Welcome To mojolicious.io! - mojolicious.io Page at https://mojolicious.io/ is titled: Welcome To mojolicious.io! - mojolicious.io Use of uninitialized value $ref_to_this_sub in method lookup at /home/vidar/perl5/perlbrew/perls/perl-5.26.2/lib/site_perl/5.26.2/Mojo/UserAgent/Role/Queued.pm line 22. Mojo::Reactor::EV: I/O watcher failed: Can't locate object method "" via package "Mojo::UserAgent__WITH__Mojo::UserAgent::Role::Queued" at /home/vidar/perl5/perlbrew/perls/perl-5.26.2/lib/site_perl/5.26.2/Mojo/UserAgent/Role/Queued.pm line 22. Use of uninitialized value $ref_to_this_sub in method lookup at /home/vidar/perl5/perlbrew/perls/perl-5.26.2/lib/site_perl/5.26.2/Mojo/UserAgent/Role/Queued.pm line 22. Mojo::Reactor::EV: I/O watcher failed: Can't locate object method "" via package "Mojo::UserAgent__WITH__Mojo::UserAgent::Role::Queued" at /home/vidar/perl5/perlbrew/perls/perl-5.26.2/lib/site_perl/5.26.2/Mojo/UserAgent/Role/Queued.pm line 22.

dotandimet commented 6 years ago

Looks like a scope problem, and this is fixed via the helper class added in the latest release (1.10)