You've already forked algora-tv
							
							
				mirror of
				https://github.com/algora-io/tv.git
				synced 2025-10-30 23:07:56 +02:00 
			
		
		
		
	ensure only nodes in primary region process jobs
This commit is contained in:
		| @@ -23,7 +23,8 @@ config :algora, AlgoraWeb.Endpoint, | ||||
|   ] | ||||
|  | ||||
| config :algora, Oban, | ||||
|   repo: Algora.Repo.Local, | ||||
|   repo: Algora.Repo, | ||||
|   notifier: Oban.Notifiers.PG, | ||||
|   queues: [default: 10] | ||||
|  | ||||
| config :esbuild, | ||||
|   | ||||
| @@ -41,6 +41,13 @@ if config_env() == :prod do | ||||
|     url: database_url, | ||||
|     pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10") | ||||
|  | ||||
|   unless Fly.RPC.is_primary?() do | ||||
|     config :algora, Oban, | ||||
|       queues: false, | ||||
|       plugins: false, | ||||
|       peer: false | ||||
|   end | ||||
|  | ||||
|   secret_key_base = | ||||
|     System.get_env("SECRET_KEY_BASE") || | ||||
|       raise """ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user