-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: increase expiration time for auth context (#2268)
* perf: increase expiration time for auth context * perf: increase auth cache ttl, add oauth_access_tokens to publication_tables * chore: fix invalid expiration error * chore: use alter publication * chore: correct alter publication syntax
- Loading branch information
Showing
6 changed files
with
59 additions
and
1 deletion.
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 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
19 changes: 19 additions & 0 deletions
19
priv/repo/migrations/20241204120824_recreate_tables_publication.exs
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,19 @@ | ||
defmodule Logflare.Repo.Migrations.RecreateTablesPublication do | ||
use Ecto.Migration | ||
use Ecto.Migration | ||
|
||
@publications Application.get_env(:logflare, Logflare.ContextCache.CacheBuster)[:publications] | ||
@table "oauth_access_tokens" | ||
|
||
def up do | ||
for p <- @publications do | ||
execute("ALTER PUBLICATION #{p} ADD TABLE #{@table};") | ||
end | ||
end | ||
|
||
def down do | ||
for p <- @publications do | ||
execute("ALTER PUBLICATION #{p} DROP TABLE #{@table};") | ||
end | ||
end | ||
end |
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