fix: Indexer memory limit for api instance (#11066)

pull/11013/merge
Qwerty5Uiop 3 weeks ago committed by GitHub
parent ab7eddd3d0
commit 9b943cc9dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      apps/indexer/lib/indexer/memory/monitor.ex

@ -47,11 +47,17 @@ defmodule Indexer.Memory.Monitor do
@impl GenServer
def init(options) when is_map(options) do
case Application.get_env(:explorer, :mode) do
:api ->
:ignore
_other_mode ->
state = struct!(__MODULE__, Map.put_new(options, :limit, define_memory_limit()))
{:ok, timer_reference} = :timer.send_interval(state.timer_interval, :check)
{:ok, %__MODULE__{state | timer_reference: timer_reference}}
end
end
@impl GenServer
def handle_call(:shrinkable, {pid, _}, %__MODULE__{shrinkable_set: shrinkable_set} = state) do

Loading…
Cancel
Save