Thomas Dippel
Thomas Dippel
@meatballhat we're already depending on our environment in the resque task: ``` ruby require 'resque/tasks' require 'resque_scheduler/tasks' task "resque:setup" => :environment ```
How about being able to pass a time to the increment method, which will be used instead of the current time when storing the values to redis?
@bcaccinolo exactly, it would then be a simple task of iterating over your database values and calling the `increment_at` method to seed redis
It would be nice to be able to get the 95th and 99th percentile for a period as well.
We're experiencing the same issue running - rails 7.1.3.4 - pg 1.5.5 - unicorn 6.1.0 For us the error does not seem to be related to memory usage on the...
We worked around the issue by adding the following monkey-patch: ```ruby ################################################################################################### # Modify ActiveRecord::ConnectionAdapters::ConnectionPool to remove thread unsafe assignment # causing `ActiveRecord::StatementInvalid: wrong argument type nil (expected PG::TypeMap)` errors...
> @dipth, for your monkey patch, do you have an idea how should i apply it with more recent rails version? > https://github.com/rails/rails/blob/v7.2.1/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb#L856 looking at the code in the link...
``` test "test mock" do with_mock Helheim.CommentService, [foo!: fn(user) -> {:ok, user} end] do user = insert(:user) insert(:blog_post, user: user) User.foo_test(user.id) assert_called(Helheim.CommentService.foo!(%User{id: user.id})) end end ``` ``` 1) test test...
I ended up doing a bit of a "hack" to support this use case, by adding a new support module: ```elixir defmodule Helheim.AssertCalledPatternMatching do use ExUnit.CaseTemplate using do quote do...
Ah yes, I see, that would of course also be a solution :)