Skip to content

Commit

Permalink
Up version 1.1.2 (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
Neylix committed Jun 19, 2023
1 parent 83ec919 commit 89390c7
Show file tree
Hide file tree
Showing 3 changed files with 703 additions and 1 deletion.
10 changes: 10 additions & 0 deletions lib/archethic_cache/lru.ex
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ defmodule ArchethicCache.LRU do
}}
end

def code_change(_, state, _) do
# As we use hot reload we need to update also the lambda function stored in
# permanent term or GenServer state. But as we don't know the function definition
# we kill the current GenServer and the Supervisor will restart it with the new function
# using the last version
me = self()
Task.start(fn -> Process.exit(me, :kill) end)
{:ok, state}
end

def handle_call(:purge, _from, state = %{table: table, evict_fn: evict_fn}) do
# we call the evict_fn to be able to clean effects (ex: file written to disk)
:ets.foldr(
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Archethic.MixProject do
def project do
[
app: :archethic,
version: "1.1.1",
version: "1.1.2",
build_path: "_build",
config_path: "config/config.exs",
deps_path: "deps",
Expand Down
Loading

0 comments on commit 89390c7

Please sign in to comment.