Skip to content

Commit

Permalink
merge conflict and format
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasdarruda committed Nov 27, 2024
1 parent fb3e236 commit 7d0abb7
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 277 deletions.
44 changes: 10 additions & 34 deletions lib/actors/actor/entity/invocation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ defmodule Actors.Actor.Entity.Invocation do
actor:
%Actor{
id: %ActorId{name: _actor_name, parent: _parent} = id,
state: actor_state,
state: actor_state
} = _actor,
opts: actor_opts
} = state
Expand Down Expand Up @@ -355,42 +355,19 @@ defmodule Actors.Actor.Entity.Invocation do
request,
%ActorInvocationResponse{checkpoint: checkpoint} = response,
%EntityState{
actor:
%Actor{
id: id,
settings:
%ActorSettings{
kind: kind,
projection_settings: projection_settings
} = _settings
} = _actor,
revision: revision
} = state,
opts
) do
response =
case do_response(request, response, state, opts) do
:noreply ->
{:noreply, state}
|> return_and_maybe_hibernate()

response ->
{:reply, {:ok, response}, state}
|> return_and_maybe_hibernate()
end

response_checkpoint(response, checkpoint, revision, state)
end


defp handle_response(
request,
%ActorInvocationResponse{checkpoint: checkpoint} = response,
%EntityState{
actor:
%Actor{
id: id,
settings:
%ActorSettings{
kind: kind,
projection_settings: projection_settings
} = _settings
} = _actor,
revision: revision
} = state,
opts
) do
response_params = %{
actor_id: id,
kind: kind,
Expand Down Expand Up @@ -499,7 +476,6 @@ defmodule Actors.Actor.Entity.Invocation do
}
end


defp response_checkpoint(response, checkpoint, revision, state) do
if checkpoint do
Lifecycle.checkpoint(revision, state)
Expand Down
125 changes: 28 additions & 97 deletions lib/spawn/actors/eigr/functions/protocol/actors/actor.pb.ex
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
defmodule Eigr.Functions.Protocol.Actors.Kind do
@moduledoc false
<<<<<<< HEAD
use Protobuf, enum: true, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, enum: true, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, enum: true, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -42,14 +38,16 @@ defmodule Eigr.Functions.Protocol.Actors.Kind do
__unknown_fields__: []
},
%Google.Protobuf.EnumValueDescriptorProto{
<<<<<<< HEAD
name: "PROJECTION",
=======
name: "TASK",
>>>>>>> main
number: 5,
options: nil,
__unknown_fields__: []
},
%Google.Protobuf.EnumValueDescriptorProto{
name: "PROJECTION",
number: 6,
options: nil,
__unknown_fields__: []
}
],
options: nil,
Expand All @@ -64,20 +62,13 @@ defmodule Eigr.Functions.Protocol.Actors.Kind do
field(:UNNAMED, 2)
field(:POOLED, 3)
field(:PROXY, 4)
<<<<<<< HEAD
field(:PROJECTION, 5)
=======
field(:TASK, 5)
>>>>>>> main
field(:PROJECTION, 6)
end

defmodule Eigr.Functions.Protocol.Actors.Registry.ActorsEntry do
@moduledoc false
<<<<<<< HEAD
use Protobuf, map: true, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, map: true, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, map: true, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -140,11 +131,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.Registry do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -239,11 +226,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.ActorSystem do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -297,11 +280,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.ActorSnapshotStrategy do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -348,11 +327,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.ActorDeactivationStrategy do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -399,11 +374,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.TimeoutStrategy do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -442,11 +413,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.Action do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -485,11 +452,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.FixedTimerAction do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -543,11 +506,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.ActorState.TagsEntry do
@moduledoc false
<<<<<<< HEAD
use Protobuf, map: true, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, map: true, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, map: true, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -610,11 +569,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.ActorState do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -725,11 +680,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.Metadata.TagsEntry do
@moduledoc false
<<<<<<< HEAD
use Protobuf, map: true, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, map: true, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, map: true, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -792,11 +743,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.Metadata do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -911,11 +858,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.Channel do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -969,7 +912,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.ProjectionSubject do
@moduledoc false
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -1038,7 +981,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.EventsRetentionTime do
@moduledoc false
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -1077,7 +1020,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.EventsRetentionStrategy do
@moduledoc false
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -1144,7 +1087,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.ProjectionSettings do
@moduledoc false
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -1233,11 +1176,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.ActorSettings do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -1379,11 +1318,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.ActorId do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -1452,11 +1387,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.Actor do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
defmodule Eigr.Functions.Protocol.Actors.PbExtension do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

extend(Google.Protobuf.FieldOptions, :actor_id, 9999,
optional: true,
Expand Down
12 changes: 2 additions & 10 deletions lib/spawn/actors/eigr/functions/protocol/actors/healthcheck.pb.ex
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
defmodule Eigr.Functions.Protocol.Actors.Healthcheck.Status do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down Expand Up @@ -73,11 +69,7 @@ end

defmodule Eigr.Functions.Protocol.Actors.Healthcheck.HealthCheckReply do
@moduledoc false
<<<<<<< HEAD
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.12.0"
=======
use Protobuf, protoc_gen_elixir_version: "0.13.0", syntax: :proto3
>>>>>>> main
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"

def descriptor do
# credo:disable-for-next-line
Expand Down
Loading

0 comments on commit 7d0abb7

Please sign in to comment.