Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F76407439
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
Wed, Aug 7, 19:26
Size
868 B
Mime Type
text/x-php
Expires
Fri, Aug 9, 19:26 (1 d, 22 h)
Engine
blob
Format
Raw Data
Handle
19705194
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