Validaciones pausa instantaneas
This commit is contained in:
@@ -81,7 +81,6 @@ async function startCron() {
|
||||
}
|
||||
}, PERIODO_VOLCADO)
|
||||
|
||||
|
||||
await pauseTask.run()
|
||||
const PERIODO_CANCELACIONES = 60 * 60 * 1000;
|
||||
const clacelacionesInterval = setInterval(async () => {
|
||||
|
||||
@@ -8,7 +8,7 @@ describe("[Integration] Test API requests", () => {
|
||||
postgresClient
|
||||
)
|
||||
|
||||
it("Read /lines with multiple iccids", () => {
|
||||
it("Read last sucessfull operation by line", () => {
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user