Converts 200+ endpoint files to use queryTimed() wrapper which tracks DB query count and execution time. Restores perf dashboard files that were accidentally moved to _scripts/. Includes portal UI updates.
26 lines
611 B
Text
26 lines
611 B
Text
<cfsetting showdebugoutput="false">
|
|
<cfcontent type="application/json; charset=utf-8">
|
|
<cfscript>
|
|
// Close all open chat tasks
|
|
try {
|
|
result = queryTimed("
|
|
UPDATE Tasks
|
|
SET CompletedOn = NOW()
|
|
WHERE TaskTypeID = 2
|
|
AND CompletedOn IS NULL
|
|
", {}, { datasource: "payfrit" });
|
|
|
|
affected = result.recordCount ?: 0;
|
|
|
|
writeOutput(serializeJSON({
|
|
"OK": true,
|
|
"MESSAGE": "Closed all open chats",
|
|
"AFFECTED": affected
|
|
}));
|
|
} catch (any e) {
|
|
writeOutput(serializeJSON({
|
|
"OK": false,
|
|
"ERROR": e.message
|
|
}));
|
|
}
|
|
</cfscript>
|