1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

M #-: Sort hooks by execution id (#1262)

(cherry picked from commit 6a4417c4a79d6ab3efef9bc09ce9a2dea9f7160c)
This commit is contained in:
Pavel Czerný 2021-05-31 17:55:27 +02:00 committed by Ruben S. Montero
parent c818a269ae
commit e0855a22d3
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -57,11 +57,7 @@ int HookLog::_dump_log(int hkid, int exec_id, std::string &xml_log)
cmd << "SELECT body FROM "<< one_db::hook_log_table;
if ( hkid == -1 )
{
cmd << " ORDER BY hkid DESC";
}
else
if ( hkid != -1 )
{
cmd << " WHERE hkid = " << hkid;
}
@ -71,6 +67,8 @@ int HookLog::_dump_log(int hkid, int exec_id, std::string &xml_log)
cmd << " AND exeid = " << exec_id;
}
cmd << " ORDER BY hkid DESC, exeid";
xml_log.append("<HOOKLOG>");
cb.set_callback(&xml_log);