Validaciones pausa instantaneas

This commit is contained in:
2026-04-15 11:47:33 +02:00
parent bb4bce4a6d
commit e359acc1d5
3 changed files with 15 additions and 2 deletions

View File

@@ -81,7 +81,6 @@ async function startCron() {
}
}, PERIODO_VOLCADO)
await pauseTask.run()
const PERIODO_CANCELACIONES = 60 * 60 * 1000;
const clacelacionesInterval = setInterval(async () => {

View File

@@ -8,7 +8,7 @@ describe("[Integration] Test API requests", () => {
postgresClient
)
it("Read /lines with multiple iccids", () => {
it("Read last sucessfull operation by line", () => {
})
})

View File

@@ -146,6 +146,20 @@ export class ObjeniousOperationsRepository implements IOperationsRepository {
}
}
async getLastOperationOfLine(iccid: string) {
const query = `
SELECT * FROM public.objenious_operation
WHERE iccids = $1
ORDER BY id asc limit 1
`
const values = [iccid];
const { rows } = await this.pgClient.query(query, values);
return <Result<string, ObjeniousOperation>>{
data: rows[0]
}
}
async updateOperation(data: ObjeniousOperationChange): Promise<Result<string, ObjeniousOperation>> {
const client = await this.pgClient.connect();
const {