Skip to content

Commit

Permalink
use rowcount
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Jan 22, 2024
1 parent 6c097cf commit 3e06186
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/vm/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@ export abstract class VMManager {
console.log('[TERMINATE]', vmid);
// Update the DB before calling terminate
// If we don't actually complete the termination, cleanup will reset it
const { rows } = await postgres.query(
`DELETE FROM vbrowser WHERE pool = $1 AND vmid = $2 RETURNING id`,
const { command, rowCount } = await postgres.query(
`DELETE FROM vbrowser WHERE pool = $1 AND vmid = $2`,
[this.getPoolName(), vmid]
);
console.log('DELETE', rows.length);
console.log(command, rowCount);
// We can log the VM lifetime by returning the creationTime and diffing
await this.terminateVM(vmid);
};
Expand Down

0 comments on commit 3e06186

Please sign in to comment.