Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F545493
PhabricatorTaskmasterDaemonModule.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
698 B
Referenced Files
None
Subscribers
None
PhabricatorTaskmasterDaemonModule.php
View Options
<?php
final
class
PhabricatorTaskmasterDaemonModule
extends
PhutilDaemonOverseerModule
{
public
function
shouldWakePool
(
PhutilDaemonPool
$pool
)
{
$class
=
$pool
->
getPoolDaemonClass
();
if
(
$class
!=
'PhabricatorTaskmasterDaemon'
)
{
return
false
;
}
if
(
$this
->
shouldThrottle
(
$class
,
1
))
{
return
false
;
}
$table
=
new
PhabricatorWorkerActiveTask
();
$conn
=
$table
->
establishConnection
(
'r'
);
$row
=
queryfx_one
(
$conn
,
'SELECT id FROM %T WHERE leaseOwner IS NULL
OR leaseExpires <= %d LIMIT 1'
,
$table
->
getTableName
(),
PhabricatorTime
::
getNow
());
if
(!
$row
)
{
return
false
;
}
return
true
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 12:53 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
122458
Default Alt Text
PhabricatorTaskmasterDaemonModule.php (698 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment