Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
machadovilaca committed Jan 29, 2021
2 parents 4ff042a + 339c91e commit 47ebb02
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ RUN cd assets/ && \
cd - && \
mix do compile, phx.digest

RUN chmod -R a+rw /opt/app

USER default

ENTRYPOINT ["/opt/app/docker-entrypoint.sh"]
7 changes: 5 additions & 2 deletions lib/infin/importer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ defmodule Infin.Importer do
Application.get_env(:infin, InfinWeb.Endpoint)[:pt_invoices_url] <>
"/invoices",
{:stream, enumerable},
headers
headers,
[timeout: 15_000]
) do
{:ok, response} ->
case response.status_code do
Expand Down Expand Up @@ -97,7 +98,9 @@ defmodule Infin.Importer do
Neuron.Config.set(url: analytics_url)

Neuron.query(
"{ categorize_invoices(invoices: \"{\\\"list\\\": #{parsed_invoices}}\")}"
"{ categorize_invoices(invoices: \"{\\\"list\\\": #{parsed_invoices}}\")}",
%{},
connection_opts: [recv_timeout: 15_000]
)
end

Expand Down
1 change: 1 addition & 0 deletions lib/infin/invoices.ex
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ defmodule Infin.Invoices do
|> where(company_id: ^company_id)
|> join(:left, [i], ti in InvoiceTransaction, on: i.id == ti.invoice_id)
|> where([i, ti], is_nil(ti.invoice_id))
|> order_by([i], [desc: i.doc_emission_date])
|> preload([:company_seller])
|> Repo.paginate(page: page_number)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/infin_web/controllers/user_auth.ex
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ defmodule InfinWeb.UserAuth do
conn
|> renew_session()
|> delete_resp_cookie(@remember_me_cookie)
|> redirect(to: Routes.home_path(conn, :index))
|> redirect(to: "/")
end

@doc """
Expand Down
2 changes: 1 addition & 1 deletion lib/infin_web/templates/layout/_navbar.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<nav class="navbar is-fixed-top" role="navigation" aria-label="main navigation">
<% end %>
<div class="navbar-brand">
<a class="navbar-item" href="/">
<a class="navbar-item" href="<%= Routes.dashboard_dashboard_path(@conn, :index) %>">
<img src="<%= Routes.static_path(@conn, "/images/logo.png") %>">
</a>

Expand Down

0 comments on commit 47ebb02

Please sign in to comment.