Skip to content

Commit

Permalink
🎉 OTP26 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksei Matiushkin committed May 25, 2023
1 parent 23117dc commit 4946a4d
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 17 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ jobs:
fail-fast: false
matrix:
include:
- pair:
otp: 26.0
elixir: 1.14.5-otp-26
- pair:
otp: 25.2
elixir: 1.14.3
elixir: 1.14.5-otp-25
- pair:
otp: 24.2
elixir: 1.12.3
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ Tarearbol.drain

### Changelog

- **`1.9.2`** single global state process in cluster
- **`1.9.0`** `put_new/3` to avoid flip-flopping children in cluster
- **`1.10.1`** OTP26 ready
- **`1.10.0`** single global state process in cluster + `put_new/3` to avoid flip-flopping children in cluster
- **`1.8.0`** finally standardized and deprecated multi in favor of normal `put/3`/`get/2`/`del/3`
- **`1.7.0`** less aggressive `Map.update!/3` + modern era update
- **`1.6.0`** `HashRing` default for `synch`/`asynch` calls in `Tarearbol.DynamicWorker` selection (to preserve idempotency amongst calls)
Expand Down
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Config
config :tarearbol, persistent: false

config :cloister,
sentry: ~w|tarearbol_1@127.0.0.1 inexisting@127.0.0.1|a,
sentry: ~w|cloister@10.8.0.130 tarearbol_1@127.0.0.1 inexisting@127.0.0.1|a,
consensus: 1

if File.exists?("config/#{Mix.env()}.exs"), do: import_config("#{Mix.env()}.exs")
10 changes: 5 additions & 5 deletions lib/tarearbol/dynamic_management/dynamic_manager.ex
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ defmodule Tarearbol.DynamicManager do

@impl Tarearbol.DynamicManager
def perform(id, _payload) do
Logger.warn(
Logger.warning(
"[🌴] perform for id[#{id}] was executed with state\n\n" <>
inspect(__state_module__().state()) <>
"\n\nyou want to override `perform/2` in your #{inspect(__MODULE__)}\n" <>
Expand All @@ -483,7 +483,7 @@ defmodule Tarearbol.DynamicManager do

@impl Tarearbol.DynamicManager
def call(_message, _from, {id, _payload}) do
Logger.warn(
Logger.warning(
"[🌴] call for id[#{id}] was executed with state\n\n" <>
inspect(__state_module__().state()) <>
"\n\nyou want to override `call/3` in your #{inspect(__MODULE__)}\n" <>
Expand All @@ -495,7 +495,7 @@ defmodule Tarearbol.DynamicManager do

@impl Tarearbol.DynamicManager
def cast(_message, {id, _payload}) do
Logger.warn(
Logger.warning(
"[🌴] cast for id[#{id}] was executed with state\n\n" <>
inspect(__state_module__().state()) <>
"\n\nyou want to override `cast/2` in your #{inspect(__MODULE__)}\n" <>
Expand Down Expand Up @@ -523,7 +523,7 @@ defmodule Tarearbol.DynamicManager do
defoverridable handle_state_change: 1

@impl Tarearbol.DynamicManager
def handle_timeout(state), do: Logger.warn("[🌴] a worker is too slow [#{inspect(state)}]")
def handle_timeout(state), do: Logger.warning("[🌴] a worker is too slow [#{inspect(state)}]")

defoverridable handle_timeout: 1

Expand Down Expand Up @@ -723,7 +723,7 @@ defmodule Tarearbol.DynamicManager do
|a
defp report_override(nil, mod, kind, name, arity) when name in @reserved,
do:
Logger.warn("""
Logger.warning("""
[🌴] You are trying to override the reserved function in `#{kind} #{inspect(Function.capture(mod, name, arity))}`.
Please consider choosing another name.
""")
Expand Down
4 changes: 2 additions & 2 deletions lib/tarearbol/dynamic_management/dynamic_worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ defmodule Tarearbol.DynamicWorker do

@impl GenServer
def handle_info({:EXIT, _pid, reason}, state) do
Logger.warn(
Logger.warning(
"[🌴] Unexpected EXIT reason " <> inspect(reason) <> "\nState:\n" <> inspect(state)
)

Expand Down Expand Up @@ -159,7 +159,7 @@ defmodule Tarearbol.DynamicWorker do
state

:multihalt ->
Logger.warn("""
Logger.warning("""
[🌴] Returning `:multihalt` from callbacks is deprecated.
Use `distributed: true` parameter in call to `use Tarearbol.DynamicManager`
and return regular `:halt` instead.
Expand Down
4 changes: 2 additions & 2 deletions lib/tarearbol/dynamic_management/internal_worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ defmodule Tarearbol.InternalWorker do

@spec multiput(module_name :: module(), id :: DynamicManager.id(), opts :: Enum.t()) :: :ok
def multiput(module_name, id, opts) do
Logger.warn("[🌴] `multiput/3` is deprecated, use `put/3` instead")
Logger.warning("[🌴] `multiput/3` is deprecated, use `put/3` instead")
put(module_name, id, opts)
end

@spec multidel(module_name :: module(), id :: DynamicManager.id()) :: :ok
def multidel(module_name, id) do
Logger.warn("[🌴] `multidel/3` function is deprecated, use `del/3` instead")
Logger.warning("[🌴] `multidel/3` function is deprecated, use `del/3` instead")
del(module_name, id)
end

Expand Down
5 changes: 3 additions & 2 deletions lib/tarearbol/extras/crontab.ex
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,9 @@ defmodule Tarearbol.Crontab do
_Examples_
iex> Tarearbol.Crontab.formula("42 3 28 08 *").formula
"(day == 28) && (rem(day_of_week, 1) == 0) && (hour == 3) && (minute == 42) && (month == 8)"
iex> formula = Tarearbol.Crontab.formula("42 3 28 08 *").formula
...> formula |> String.split(" && ") |> Enum.sort()
["(day == 28)", "(hour == 3)", "(minute == 42)", "(month == 8)", "(rem(day_of_week, 1) == 0)"]
iex> Tarearbol.Crontab.formula("423 * * * *")
{:error, [minute: {:could_not_parse_field, ["423"]}]}
Expand Down
2 changes: 1 addition & 1 deletion lib/tarearbol/scheduler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ defmodule Tarearbol.Scheduler do
{:replace, id, %{payload | job: %Job{job | schedule: schedule}}}

{_, result} ->
Logger.warn(
Logger.warning(
"[🌴] Unexpected return from the job: #{inspect(result)}, must be :halt, or {:ok, _}, or {{:reschedule, _}, _}"
)

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 Tarearbol.Mixfile do
use Mix.Project

@app :tarearbol
@version "1.10.0"
@version "1.10.1"

def project do
[
Expand Down

0 comments on commit 4946a4d

Please sign in to comment.