Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122201736
PhabricatorWorkerTask.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, Jul 16, 14:10
Size
1 KB
Mime Type
text/x-php
Expires
Fri, Jul 18, 14:10 (2 d)
Engine
blob
Format
Raw Data
Handle
27442832
Attached To
rPH Phabricator
PhabricatorWorkerTask.php
View Options
<?php
abstract
class
PhabricatorWorkerTask
extends
PhabricatorWorkerDAO
{
// NOTE: If you provide additional fields here, make sure they are handled
// correctly in the archiving process.
protected
$taskClass
;
protected
$leaseOwner
;
protected
$leaseExpires
;
protected
$failureCount
;
protected
$dataID
;
protected
$priority
;
private
$data
;
private
$executionException
;
final
public
function
setExecutionException
(
Exception
$execution_exception
)
{
$this
->
executionException
=
$execution_exception
;
return
$this
;
}
final
public
function
getExecutionException
()
{
return
$this
->
executionException
;
}
final
public
function
setData
(
$data
)
{
$this
->
data
=
$data
;
return
$this
;
}
final
public
function
getData
()
{
return
$this
->
data
;
}
final
public
function
isArchived
()
{
return
(
$this
instanceof
PhabricatorWorkerArchiveTask
);
}
final
public
function
getWorkerInstance
()
{
$id
=
$this
->
getID
();
$class
=
$this
->
getTaskClass
();
if
(!
class_exists
(
$class
))
{
throw
new
PhabricatorWorkerPermanentFailureException
(
"Task class '{$class}' does not exist!"
);
}
if
(!
is_subclass_of
(
$class
,
'PhabricatorWorker'
))
{
throw
new
PhabricatorWorkerPermanentFailureException
(
"Task class '{$class}' does not extend PhabricatorWorker."
);
}
return
newv
(
$class
,
array
(
$this
->
getData
()));
}
}
Event Timeline
Log In to Comment