Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82878195
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
Fri, Sep 13, 23:32
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Sep 15, 23:32 (2 d)
Engine
blob
Format
Raw Data
Handle
20768065
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