Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F109901129
PhabricatorSearchWorker.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Apr 23, 22:00
Size
546 B
Mime Type
text/x-php
Expires
Fri, Apr 25, 22:00 (2 d)
Engine
blob
Format
Raw Data
Handle
25759251
Attached To
rPH Phabricator
PhabricatorSearchWorker.php
View Options
<?php
final
class
PhabricatorSearchWorker
extends
PhabricatorWorker
{
protected
function
doWork
()
{
$data
=
$this
->
getTaskData
();
$phid
=
idx
(
$data
,
'documentPHID'
);
$context
=
idx
(
$data
,
'context'
);
try
{
id
(
new
PhabricatorSearchIndexer
())
->
indexDocumentByPHID
(
$phid
,
$context
);
}
catch
(
Exception
$ex
)
{
throw
new
PhabricatorWorkerPermanentFailureException
(
pht
(
'Failed to update search index for document "%s": %s'
,
$phid
,
$ex
->
getMessage
()));
}
}
}
Event Timeline
Log In to Comment