Changeset 40 for trunk/cleanup.php


Ignore:
Timestamp:
Apr 28, 2019, 3:00:50 PM (6 years ago)
Author:
gegorbet
Message:

more time information in error,completion emails

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cleanup.php

    r39 r40  
    3232   global $editXMLFilename;
    3333   global $submittime;
     34   global $endtime;
    3435   global $status;
    3536   global $stderr;
     
    7374   list( $personID ) = mysqli_fetch_array( $result );
    7475
    75    $query  = "SELECT clusterName, submitTime, queueStatus, analType "              .
    76              "FROM HPCAnalysisRequest h, HPCAnalysisResult r "                   .
    77              "WHERE h.HPCAnalysisRequestID=$requestID "                          .
     76   $query  = "SELECT clusterName, submitTime, queueStatus, analType " .
     77             "FROM HPCAnalysisRequest h, HPCAnalysisResult r "        .
     78             "WHERE h.HPCAnalysisRequestID=$requestID "               .
    7879             "AND h.HPCAnalysisRequestID=r.HPCAnalysisRequestID";
    7980
     
    9596
    9697   // Get the GFAC ID
    97    $query = "SELECT HPCAnalysisResultID, gfacID FROM HPCAnalysisResult " .
     98   $query = "SELECT HPCAnalysisResultID, gfacID, endTime FROM HPCAnalysisResult " .
    9899            "WHERE HPCAnalysisRequestID=$requestID";
    99100
     
    107108   }
    108109
    109    list( $HPCAnalysisResultID, $gfacID ) = mysqli_fetch_array( $result );
     110   list( $HPCAnalysisResultID, $gfacID, $endtime ) = mysqli_fetch_array( $result );
    110111
    111112   // Get data from global GFAC DB then insert it into US3 DB
     
    664665   global $email_address;
    665666   global $submittime;
     667   global $endtime;
    666668   global $queuestatus;
    667669   global $status;
     
    742744
    743745   // Try to avoid spam filters
    744    $now = time();
     746   $now      = time();
     747   $tnow     = date( 'Y-m-d H:i:s' );
    745748   $headers .= "Message-ID: <" . $now . "cleanup@$dbhost>\n";
    746749   $headers .= "X-Mailer: PHP v" . phpversion()         . "\n";
     
    753756
    754757   Submission Time : $submittime
     758   Job End Time    : $endtime
     759   Mail Time       : $tnow
    755760   LIMS Host       : $limshost
    756761   Analysis ID     : $gfacID
Note: See TracChangeset for help on using the changeset viewer.