-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Extract JWT helper in test * Add test on publish endpoint (unit and integration) * Add some integration test on public api * Allow to configure sse timeout and sse keepalive from a client point of view * Remove dead file: `neurow/lib/neurow.ex` * Allow to tune jwt max lifetime * Avoid Application.fetch_env in public endpoint * Export metrics for JWT errors * Handle shutdown properly
- Loading branch information
Showing
16 changed files
with
552 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
defmodule StopListener do | ||
use GenServer | ||
require Logger | ||
|
||
def start_link(opts) do | ||
GenServer.start_link(__MODULE__, opts, name: __MODULE__) | ||
end | ||
|
||
@impl true | ||
def init(_) do | ||
:ets.new(__MODULE__, [:set, :named_table, read_concurrency: true]) | ||
Process.flag(:trap_exit, true) | ||
{:ok, %{shutdown_in_progress: false}} | ||
end | ||
|
||
def close_connections?() do | ||
try do | ||
:ets.lookup(__MODULE__, :close_connections?) | ||
false | ||
rescue | ||
ArgumentError -> true | ||
end | ||
end | ||
|
||
@impl GenServer | ||
def terminate(_reason, _state) do | ||
Logger.info("Graceful Shutdown occurring") | ||
:ok | ||
end | ||
end |
Oops, something went wrong.