コード例 #1
0
    echo json_encode($json);
    return;
}
$day_of_week_int = date('N') - 1;
$stmt = phoromatic_server::$db->prepare('SELECT * FROM phoromatic_account_settings WHERE AccountID = :account_id');
$stmt->bindValue(':account_id', ACCOUNT_ID);
$result = $stmt->execute();
$phoromatic_account_settings = $result->fetchArray(SQLITE3_ASSOC);
unset($phoromatic_account_settings['AccountID']);
$sys_stmt = phoromatic_server::$db->prepare('SELECT * FROM phoromatic_systems WHERE AccountID = :account_id AND SystemID = :system_id LIMIT 1');
$sys_stmt->bindValue(':account_id', ACCOUNT_ID);
$sys_stmt->bindValue(':system_id', SYSTEM_ID);
$sys_result = $sys_stmt->execute();
$sys_row = $sys_result->fetchArray();
// SEE IF SCHEDULE NEEDS TO RUN
$schedule_row = phoromatic_server::system_check_for_open_schedule_run(ACCOUNT_ID, SYSTEM_ID, 0, $sys_row);
if ($schedule_row != false) {
    $res = phoromatic_generate_test_suite($schedule_row, $json, $phoromatic_account_settings, $sys_row);
    if ($res) {
        return;
    }
}
// END OF SCHEDULE RUN
// BENCHMARK TICKET
$ticket_row = phoromatic_server::system_check_for_open_benchmark_ticket(ACCOUNT_ID, SYSTEM_ID, $sys_row);
if ($ticket_row != false) {
    pts_logger::add_to_log(SYSTEM_ID . ' - needs to benchmark ticket for ' . $ticket_row['Title']);
    $res = phoromatic_generate_benchmark_ticket($ticket_row, $json, $phoromatic_account_settings, $sys_row);
    if ($res) {
        return;
    }