Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F43924
find_smallest_queued_commit.php
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
epriestley
May 22 2013, 3:39 PM
2013-05-22 15:39:23 (UTC+0)
Size
677 B
Referenced Files
None
Subscribers
None
find_smallest_queued_commit.php
View Options
<?php
$min
=
PHP_INT_MAX
;
$tasks
=
new
LiskMigrationIterator
(
new
PhabricatorWorkerActiveTask
());
foreach
(
$tasks
as
$task
)
{
$class
=
$task
->
getTaskClass
();
if
(!
preg_match
(
'/ChangeParserWorker/'
,
$class
))
{
continue
;
}
$data
=
id
(
new
PhabricatorWorkerTaskData
())->
loadOneWhere
(
'id = %d'
,
$task
->
getDataID
());
if
(!
$data
)
{
continue
;
}
$min
=
min
(
idx
(
$data
->
getData
(),
'commitID'
,
PHP_INT_MAX
),
$min
);
}
echo
"Min commit ID is: {$min}
\n
"
;
$commit
=
id
(
new
PhabricatorRepositoryCommit
())->
load
(
$min
);
if
(
$commit
)
{
echo
"Minimum queued commit is r"
.
$commit
->
getCommitIdentifier
().
"
\n
"
;
}
else
{
echo
"No minimum queued commit found."
;
}
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/fw/zj/eqrclvfpcikreiw5
Default Alt Text
find_smallest_queued_commit.php (677 B)
Attached To
Mode
P838 find_smallest_queued_commit.php
Attached
Detach File
Event Timeline
Log In to Comment