style: clean up code formatting and remove trailing whitespace
refactor: reorganize imports and fix type imports
This commit is contained in:
1 parent
d3704602fd
commit
47c04de6fe
232 files changed
+7140
-4798
No files matched your search
@@ -3,8 +3,8 @@
|
||||
* Agregação de métricas e expiração de anúncios
|
||||
*/
|
||||
|
||||
import { aggregateHourlyMetrics } from "@/lib/db/queries/telemetry";
|
||||
import { query } from "@/lib/db/index";
|
||||
import { aggregateHourlyMetrics } from "@/lib/db/queries/telemetry";
|
||||
import { secureLogger } from "@/lib/secure-logger";
|
||||
|
||||
/**
|
||||
@@ -14,9 +14,9 @@ import { secureLogger } from "@/lib/secure-logger";
|
||||
export async function aggregateTelemetry(): Promise<void> {
|
||||
try {
|
||||
secureLogger.info("🔄 Iniciando agregação de telemetria...");
|
||||
|
||||
|
||||
await aggregateHourlyMetrics();
|
||||
|
||||
|
||||
secureLogger.info("✅ Agregação de telemetria concluída");
|
||||
} catch (error) {
|
||||
secureLogger.error("❌ Erro ao agregar telemetria", error);
|
||||
@@ -45,7 +45,7 @@ export async function expireOldListings(): Promise<void> {
|
||||
)
|
||||
RETURNING listing_id
|
||||
`,
|
||||
[]
|
||||
[],
|
||||
);
|
||||
|
||||
const expiredCount = result.rowCount || 0;
|
||||
@@ -63,10 +63,10 @@ export async function expireOldListings(): Promise<void> {
|
||||
export async function updatePriceHistory(): Promise<void> {
|
||||
try {
|
||||
secureLogger.info("🔄 Verificando histórico de preços...");
|
||||
|
||||
|
||||
// O trigger já faz isso automaticamente, mas podemos adicionar lógica adicional aqui
|
||||
// Por exemplo, verificar se há inconsistências ou limpar históricos muito antigos
|
||||
|
||||
|
||||
secureLogger.info("✅ Histórico de preços verificado");
|
||||
} catch (error) {
|
||||
secureLogger.error("❌ Erro ao atualizar histórico de preços", error);
|
||||
@@ -93,4 +93,3 @@ export async function runBackgroundJobs(): Promise<void> {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user