Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93520070
PhabricatorRepositoryPullLocalDaemonModule.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, Nov 29, 10:12
Size
868 B
Mime Type
text/x-php
Expires
Sun, Dec 1, 10:12 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22658702
Attached To
rPH Phabricator
PhabricatorRepositoryPullLocalDaemonModule.php
View Options
<?php
final
class
PhabricatorRepositoryPullLocalDaemonModule
extends
PhutilDaemonOverseerModule
{
private
$cursor
=
0
;
public
function
shouldWakePool
(
PhutilDaemonPool
$pool
)
{
$class
=
$pool
->
getPoolDaemonClass
();
if
(
$class
!=
'PhabricatorRepositoryPullLocalDaemon'
)
{
return
false
;
}
if
(
$this
->
shouldThrottle
(
$class
,
1
))
{
return
false
;
}
$table
=
new
PhabricatorRepositoryStatusMessage
();
$table_name
=
$table
->
getTableName
();
$conn
=
$table
->
establishConnection
(
'r'
);
$row
=
queryfx_one
(
$conn
,
'SELECT id FROM %T WHERE statusType = %s
AND id > %d ORDER BY id DESC LIMIT 1'
,
$table_name
,
PhabricatorRepositoryStatusMessage
::
TYPE_NEEDS_UPDATE
,
$this
->
cursor
);
if
(!
$row
)
{
return
false
;
}
$this
->
cursor
=
(
int
)
$row
[
'id'
];
return
true
;
}
}
Event Timeline
Log In to Comment