Skip to content

Commit

Permalink
update unlaunch query
Browse files Browse the repository at this point in the history
  • Loading branch information
howardchung committed Jan 22, 2024
1 parent 111ca1a commit 6c097cf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions server/vm/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,9 @@ export abstract class VMManager {
WHERE pool = $1
AND state = 'available'
AND CAST(extract(epoch from now() - "creationTime") as INT) % (60 * 60) > $2
ORDER BY id ASC
AND id >= (SELECT id from vbrowser ORDER BY id ASC LIMIT 1 OFFSET $3)
FOR UPDATE SKIP LOCKED
LIMIT 1
OFFSET $3
) RETURNING vmid, CAST(extract(epoch from now() - "creationTime") as INT) % (60 * 60) as uptime_frac`,
[
this.getPoolName(),
Expand Down

0 comments on commit 6c097cf

Please sign in to comment.