show file update times based on cron table

This commit is contained in:
HB9HIL
2024-04-26 17:43:58 +02:00
parent e4b592ca5e
commit ae7938d765
4 changed files with 172 additions and 47 deletions

View File

@@ -179,6 +179,10 @@ class Update extends CI_Controller {
// Updates the DXCC & Exceptions from the Club Log Cty.xml file.
public function dxcc() {
$this->load->model('cron_model');
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
$this->update_status("Downloading file");
// give it 10 minutes...
@@ -239,9 +243,6 @@ class Update extends CI_Controller {
$html .= "Dxcc Prefixes: ".$this->db->count_all('dxcc_prefixes')."<br/>";
} else {
$html = $done."....<br/>";
$datetime = new DateTime("now", new DateTimeZone('UTC'));
$datetime = $datetime->format('Ymd h:i');
$this->optionslib->update('dxcc_clublog_update', $datetime , 'no');
}
file_put_contents($this->make_update_path("status.html"), $html);
@@ -327,9 +328,6 @@ class Update extends CI_Controller {
if ($nCount > 0)
{
echo "DONE: " . number_format($nCount) . " callsigns loaded";
$datetime = new DateTime("now", new DateTimeZone('UTC'));
$datetime = $datetime->format('Ymd h:i');
$this->optionslib->update('scp_update', $datetime , 'no');
} else {
echo "FAILED: Empty file";
}
@@ -401,9 +399,6 @@ class Update extends CI_Controller {
$totaltime = ($endtime - $starttime);
echo "This page was created in ".$totaltime." seconds <br />";
echo "Records inserted: " . $i . " <br/>";
$datetime = new DateTime("now", new DateTimeZone('UTC'));
$datetime = $datetime->format('Ymd h:i');
$this->optionslib->update('lotw_users_update', $datetime , 'no');
}
public function lotw_check() {
@@ -439,9 +434,6 @@ class Update extends CI_Controller {
if ($nCount > 0)
{
echo "DONE: " . number_format($nCount) . " DOKs and SDOKs saved";
$datetime = new DateTime("now", new DateTimeZone('UTC'));
$datetime = $datetime->format('Ymd h:i');
$this->optionslib->update('dok_file_update', $datetime , 'no');
} else {
echo"FAILED: Empty file";
}
@@ -493,9 +485,6 @@ class Update extends CI_Controller {
if ($nCount > 0)
{
echo "DONE: " . number_format($nCount) . " SOTA's saved";
$datetime = new DateTime("now", new DateTimeZone('UTC'));
$datetime = $datetime->format('Ymd h:i');
$this->optionslib->update('sota_file_update', $datetime , 'no');
} else {
echo"FAILED: Empty file";
}
@@ -547,9 +536,6 @@ class Update extends CI_Controller {
if ($nCount > 0)
{
echo "DONE: " . number_format($nCount) . " WWFF's saved";
$datetime = new DateTime("now", new DateTimeZone('UTC'));
$datetime = $datetime->format('Ymd h:i');
$this->optionslib->update('wwff_file_update', $datetime , 'no');
} else {
echo"FAILED: Empty file";
}
@@ -597,9 +583,6 @@ class Update extends CI_Controller {
if ($nCount > 0)
{
echo "DONE: " . number_format($nCount) . " POTA's saved";
$datetime = new DateTime("now", new DateTimeZone('UTC'));
$datetime = $datetime->format('Ymd h:i');
$this->optionslib->update('pota_file_update', $datetime , 'no');
} else {
echo"FAILED: Empty file";
}