Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33103592
search_indexing_worker.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
682 B
Referenced Files
None
Subscribers
None
search_indexing_worker.ex
View Options
defmodule
Pleroma.Workers.SearchIndexingWorker
do
use
Pleroma.Workers.WorkerHelper
,
queue
:
"search_indexing"
@impl
Oban.Worker
alias
Pleroma.Config.Getting
,
as
:
Config
def
perform
(%
Job
{
args
:
%{
"op"
=>
"add_to_index"
,
"activity"
=>
activity_id
}})
do
activity
=
Pleroma.Activity
.
get_by_id_with_object
(
activity_id
)
search_module
=
Config
.
get
([
Pleroma.Search
,
:module
])
search_module
.
add_to_index
(
activity
)
end
def
perform
(%
Job
{
args
:
%{
"op"
=>
"remove_from_index"
,
"object"
=>
object_id
}})
do
object
=
Pleroma.Object
.
get_by_id
(
object_id
)
search_module
=
Config
.
get
([
Pleroma.Search
,
:module
])
search_module
.
remove_from_index
(
object
)
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Tue, Jan 20, 2:00 PM (11 h, 44 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
964954
Default Alt Text
search_indexing_worker.ex (682 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment