Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
9f711ddc
Commit
9f711ddc
authored
Apr 20, 2021
by
feld
Browse files
Try to set query timeout intelligently
parent
9bc69196
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/activity_pub/pipeline.ex
View file @
9f711ddc
...
...
@@ -7,6 +7,7 @@ defmodule Pleroma.Web.ActivityPub.Pipeline do
alias
Pleroma
.
Config
alias
Pleroma
.
Object
alias
Pleroma
.
Repo
alias
Pleroma
.
Utils
alias
Pleroma
.
Web
.
ActivityPub
.
ActivityPub
alias
Pleroma
.
Web
.
ActivityPub
.
MRF
alias
Pleroma
.
Web
.
ActivityPub
.
ObjectValidator
...
...
@@ -24,7 +25,7 @@ defmodule Pleroma.Web.ActivityPub.Pipeline do
@spec
common_pipeline
(
map
(),
keyword
())
::
{
:ok
,
Activity
.
t
()
|
Object
.
t
(),
keyword
()}
|
{
:error
,
any
()}
def
common_pipeline
(
object
,
meta
)
do
case
Repo
.
transaction
(
fn
->
do_common_pipeline
(
object
,
meta
)
end
,
timeout:
:infinity
)
do
case
Repo
.
transaction
(
fn
->
do_common_pipeline
(
object
,
meta
)
end
,
Utils
.
query_timeout
()
)
do
{
:ok
,
{
:ok
,
activity
,
meta
}}
->
@side_effects
.
handle_after_transaction
(
meta
)
{
:ok
,
activity
,
meta
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment