Skip to content

Commit

Permalink
Use module attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
zacksiri committed Nov 1, 2024
1 parent 64c91e1 commit 68ac3a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions lib/uplink/packages/instance/bootstrap.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ defmodule Uplink.Packages.Instance.Bootstrap do
alias Uplink.Clients.LXD
alias Uplink.Clients.LXD.Cluster.Member

@instance_bootstrappable_states [
"executing",
"completed",
"refreshing",
"degraded"
]

@transition_parameters %{
"from" => "uplink",
"trigger" => false
Expand Down Expand Up @@ -77,12 +84,7 @@ defmodule Uplink.Packages.Instance.Bootstrap do
} = state,
%{"slug" => instance_name}
)
when install_current_state in [
"executing",
"completed",
"refreshing",
"degraded"
] do
when install_current_state in @instance_bootstrappable_states do
placement_name = Placement.name(instance_name)

Instances.mark("executing", install.id, instance_name)
Expand Down
2 changes: 1 addition & 1 deletion test/uplink/metrics/pipeline_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ defmodule Uplink.Metrics.PipelineTest do
} do
ref = Broadway.test_message(Uplink.Metrics.Pipeline, message)

assert_receive {:ack, ^ref, [%{data: data}], []}
assert_receive {:ack, ^ref, [%{data: data}], []}, 10_000

assert %{load: load} = data

Expand Down

0 comments on commit 68ac3a0

Please sign in to comment.