Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #187

Merged
merged 1 commit into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/phoenix/pubsub/pg2.ex
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ defmodule Phoenix.PubSub.PG2 do
:"#{adapter_name}_#{number}"
end

# Use `adapter_name` for the first in the pool for backwards compatability
# Use `adapter_name` for the first in the pool for backwards compatibility
# with v2.0 when the pool_size is 1.
groups = [adapter_name | groups]

Expand Down
6 changes: 3 additions & 3 deletions lib/phoenix/tracker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ defmodule Phoenix.Tracker do
* `server_name` - The registered name of the tracker server
* `topic` - The `Phoenix.PubSub` topic

Returns a lists of presences in key/metadata tuple pairs.
Returns a list of presences in key/metadata tuple pairs.

## Examples

Expand All @@ -217,12 +217,12 @@ defmodule Phoenix.Tracker do
* `topic` - The `Phoenix.PubSub` topic
* `key` - The key of the presence

Returns a lists of presence metadata.
Returns a list of presence metadata.

## Examples

iex> Phoenix.Tracker.get_by_key(MyTracker, "lobby", "user1")
[{#PID<0.88.0>, %{name: "User 1"}, {#PID<0.89.0>, %{name: "User 1"}]
[{#PID<0.88.0>, %{name: "User 1"}}, {#PID<0.89.0>, %{name: "User 1"}}]
"""
@spec get_by_key(atom, topic, term) :: [{pid, map}]
def get_by_key(tracker_name, topic, key) do
Expand Down
4 changes: 2 additions & 2 deletions lib/phoenix/tracker/delta_generation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defmodule Phoenix.Tracker.DeltaGeneration do
"""
@spec extract(State.t, [State.delta], State.name, State.context) :: State.delta | State.t
def extract(%State{mode: :normal} = state, generations, remote_ref, remote_context) do
case delta_fullfilling_clock(generations, remote_context) do
case delta_fulfilling_clock(generations, remote_context) do
{delta, index} ->
if index, do: Logger.debug "#{inspect state.replica}: sending delta generation #{index + 1}"
State.extract(delta, remote_ref, remote_context)
Expand Down Expand Up @@ -54,7 +54,7 @@ defmodule Phoenix.Tracker.DeltaGeneration do
end)
end

defp delta_fullfilling_clock(generations, remote_context) do
defp delta_fulfilling_clock(generations, remote_context) do
generations
|> Enum.with_index()
|> Enum.find(fn {%State{range: {local_start, local_end}}, _} ->
Expand Down
2 changes: 1 addition & 1 deletion test/phoenix/tracker/shard_replication_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ defmodule Phoenix.Tracker.ShardReplicationTest do
refute {@node1, node1_node} in get_values(@node2, node2_shard)
end

# TODO split into multiple testscases
# TODO split into multiple test cases
test "tempdowns with nodeups of new vsn, and permdowns",
%{shard: shard, topic: topic, tracker: tracker} do

Expand Down
Loading