Skip to content

Commit af6ec59

Browse files
authored
Correctif suivi du nombre de PDC IRVE dans le temps (#3966)
* Fix resource id * Adapt code path (module has been promoted to app) * Increase timeout
1 parent 4c00cab commit af6ec59

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

livebook/irve-total.livemd

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ opts = [
2828
{:ok, conn} = Kino.start_child({Postgrex, opts})
2929
```
3030

31-
<!-- livebook:{"attrs":{"cache_query":true,"connection":{"type":"postgres","variable":"conn"},"data_frame_alias":"Elixir.Explorer.DataFrame","query":"select id, payload ->> 'permanent_url' as url, inserted_at \nfrom resource_history rh\nwhere rh.resource_id = 79624\norder by inserted_at asc","result_variable":"result","timeout":null},"chunks":null,"kind":"Elixir.KinoDB.SQLCell","livebook_object":"smart_cell"} -->
31+
<!-- livebook:{"attrs":{"cache_query":true,"connection":{"type":"postgres","variable":"conn"},"data_frame_alias":"Elixir.Explorer.DataFrame","query":"select id, payload ->> 'permanent_url' as url, inserted_at \nfrom resource_history rh\nwhere rh.resource_id = 81623\norder by inserted_at asc","result_variable":"result","timeout":null},"chunks":null,"kind":"Elixir.KinoDB.SQLCell","livebook_object":"smart_cell"} -->
3232

3333
```elixir
3434
result =
@@ -37,7 +37,7 @@ result =
3737
"""
3838
select id, payload ->> 'permanent_url' as url, inserted_at
3939
from resource_history rh
40-
where rh.resource_id = 79624
40+
where rh.resource_id = 81623
4141
order by inserted_at asc
4242
""",
4343
[]
@@ -58,14 +58,14 @@ snapshots =
5858
```
5959

6060
```elixir
61-
path = Path.join(__ENV__.file, "../../scripts/irve/req_custom_cache.exs") |> Path.expand()
61+
path = Path.join(__ENV__.file, "../../apps/shared/lib/req_custom_cache.ex") |> Path.expand()
6262
Code.require_file(path)
6363

6464
defmodule Query do
6565
def cache_dir, do: Path.join(__ENV__.file, "../cache-dir") |> Path.expand()
6666

6767
def cached_get!(url) do
68-
req = Req.new() |> CustomCache.attach()
68+
req = Req.new() |> Transport.Shared.ReqCustomCache.attach()
6969
Req.get!(req, url: url, receive_timeout: 100_000, custom_cache_dir: cache_dir())
7070
end
7171
end
@@ -87,7 +87,7 @@ data =
8787
task,
8888
max_concurrency: 25,
8989
on_timeout: :kill_task,
90-
timeout: 25_000
90+
timeout: 50_000
9191
)
9292
|> Stream.map(fn {:ok, result} -> result end)
9393
|> Stream.map(fn x -> Map.take(x, ["inserted_at", "row_count"]) end)

0 commit comments

Comments
 (0)