We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
batch_cache:44 returns
:gen_event handler LogflareLogger.HttpBackend installed in Logger terminating ** (exit) an exception was raised: ** (BadFunctionError) expected a function, got: :asc (elixir) lib/enum.ex:2354: anonymous fn/3 in Enum.sort_by/3 (stdlib) lists.erl:969: :lists.sort/2 (elixir) lib/enum.ex:2354: Enum.sort_by/3 (logflare_logger_backend) lib/logflare_logger/batch_cache.ex:44: LogflareLogger.BatchCache.flush/1 (logflare_logger_backend) lib/logflare_logger/http_backend.ex:147: LogflareLogger.HttpBackend.flush!/1 (stdlib) gen_event.erl:577: :gen_event.server_update/4 (stdlib) gen_event.erl:559: :gen_event.server_notify/4 (stdlib) gen_event.erl:347: :gen_event.handle_msg/6 (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Relevant fix: Change: Enum.sort_by(pending_events, & &1.id, :asc) to Enum.sort_by(pending_events, &(&1.id), &<=/2)
Enum.sort_by(pending_events, & &1.id, :asc)
Enum.sort_by(pending_events, &(&1.id), &<=/2)
The text was updated successfully, but these errors were encountered:
Just curious what version of Elixir are you on?
Sorry, something went wrong.
Erlang/OTP 22 [erts-10.6.4] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1]
Elixir 1.9.1 (compiled with Erlang/OTP 22)
Thanks for the prompt reply!
Ah yeah, this is why. :asc was introduced later. But no reason we can't update this for backward compatibility.
:asc
have a suss at the PR I just submitted, let me know if there's anything we can do further to support
No branches or pull requests
batch_cache:44 returns
Relevant fix:
Change:
Enum.sort_by(pending_events, & &1.id, :asc)
to
Enum.sort_by(pending_events, &(&1.id), &<=/2)
The text was updated successfully, but these errors were encountered: