summaryrefslogtreecommitdiffstats
path: root/lib.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-09-04 13:42:16 +0000
committerRomain d'Alverny <rda@mageia.org>2012-09-04 13:42:16 +0000
commit5c426d34bcddc9ef198f8da968ac34ae16692776 (patch)
treeeda9bf16e43eda52da095e6e39941cc73e76b9cf /lib.php
parented760b3ef9ed44d2346e4c9358e530af74dbe3ae (diff)
downloadpkgsubmit-5c426d34bcddc9ef198f8da968ac34ae16692776.tar
pkgsubmit-5c426d34bcddc9ef198f8da968ac34ae16692776.tar.gz
pkgsubmit-5c426d34bcddc9ef198f8da968ac34ae16692776.tar.bz2
pkgsubmit-5c426d34bcddc9ef198f8da968ac34ae16692776.tar.xz
pkgsubmit-5c426d34bcddc9ef198f8da968ac34ae16692776.zip
new get_upload_time()
Diffstat (limited to 'lib.php')
-rw-r--r--lib.php17
1 files changed, 17 insertions, 0 deletions
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;
+}