Prevent publisher jobs from erroring if the connection pool is full
A full pool is a soft-error. Snooze the job for 30 seconds and try again.
This commit is contained in:
parent
ac55764599
commit
72fc41d891
1
changelog.d/gun_pool2.fix
Normal file
1
changelog.d/gun_pool2.fix
Normal file
@ -0,0 +1 @@
|
|||||||
|
Connection pool errors when publishing an activity is a soft-error that will be retried shortly.
|
@ -129,6 +129,10 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
|
|||||||
_ -> {:error, e}
|
_ -> {:error, e}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
{:error, :pool_full} ->
|
||||||
|
Logger.debug("Publisher snoozing worker job due to full connection pool")
|
||||||
|
{:snooze, 30}
|
||||||
|
|
||||||
e ->
|
e ->
|
||||||
unless params[:unreachable_since], do: Instances.set_unreachable(inbox)
|
unless params[:unreachable_since], do: Instances.set_unreachable(inbox)
|
||||||
Logger.metadata(activity: id, inbox: inbox)
|
Logger.metadata(activity: id, inbox: inbox)
|
||||||
|
Loading…
Reference in New Issue
Block a user