From 5c426d34bcddc9ef198f8da968ac34ae16692776 Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Tue, 4 Sep 2012 13:42:16 +0000 Subject: new get_upload_time() --- lib.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lib.php') diff --git a/lib.php b/lib.php index e00ed27..1b870ae 100644 --- a/lib.php +++ b/lib.php @@ -170,3 +170,20 @@ function publish_stats_headers($stats, $last_package = null) round($buildtime_total / $build_count, 2); header(sprintf('X-BS-Buildtime-Average: %5.2f', $buildtime_avg)); } + +/** + * check if emi is running + * + * @return +*/ +function get_upload_time() +{ + if (file_exists('/var/lib/schedbot/tmp/upload')) { + $stat = stat('/var/lib/schedbot/tmp/upload'); + if ($stat) { + return $stat['mtime']; + } + } + + return null; +} -- cgit v1.2.1