status.php 224 Bytes
Newer Older
dmorley's avatar
dmorley committed
1
<?php
2 3 4 5 6 7 8

/**
 * Check status of previously pulled data.
 */

declare(strict_types=1);

9
$dur = time() - filemtime('last.data');
dmorley's avatar
dmorley committed
10
echo $dur;
dmorley's avatar
changes  
dmorley committed
11
if ($dur > 4500) {
12
    http_response_code(500);
13
} else {
14
    http_response_code(200);
dmorley's avatar
dmorley committed
15
}