Skip to content

Commit 71433ac

Browse files
committed
wip
1 parent bc93f3b commit 71433ac

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/shopify_api/shop_server.ex

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,13 @@ defmodule ShopifyAPI.ShopServer do
6868
@impl GenServer
6969
def init(:ok) do
7070
create_table!()
71-
for shop when is_struct(shop, Shop) <- do_initialize(), do: set(shop, false)
72-
{:ok, :no_state}
71+
{:ok, :no_state, {:continue, :init_shops}}
72+
end
73+
74+
@impl GenServer
75+
def handle_continue(:init_shops, state) do
76+
for %Shop{} = shop <- do_initialize(), do: set(shop, false)
77+
{:no_reply, state}
7378
end
7479

7580
## Private Helpers

0 commit comments

Comments
 (0)