Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F87808814
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
Tue, Oct 15, 02:27
Size
868 B
Mime Type
text/x-php
Expires
Thu, Oct 17, 02:27 (2 d)
Engine
blob
Format
Raw Data
Handle
21659661
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