File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -44,12 +44,11 @@ export default class GCSLock {
4444 if ( ! isHealthy ) {
4545 //Lock is not healthy, restart the process
4646 return await this . take ( cancelHandler )
47- } else {
48- //Lock is still healthy, request release
49- await this . file . requestRelease ( )
50-
51- return false
5247 }
48+ //Lock is still healthy, request release
49+ await this . file . requestRelease ( )
50+
51+ return false
5352 }
5453 }
5554
@@ -112,7 +111,7 @@ export default class GCSLock {
112111 * Compare lock expiration timestamp with the current time.
113112 */
114113 protected hasExpired ( meta : GCSLockFileMetadata ) {
115- const expDate = Date . parse ( meta . exp + '' )
114+ const expDate = Date . parse ( meta . exp . toString ( ) )
116115 return ! expDate || expDate < Date . now ( )
117116 }
118117}
Original file line number Diff line number Diff line change 11import EventEmitter from 'node:events'
22import stream from 'node:stream/promises'
3- import { PassThrough , Readable } from 'node:stream'
3+ import { PassThrough , type Readable } from 'node:stream'
44import type http from 'node:http'
55
66import type { ServerOptions } from '../types'
You can’t perform that action at this time.
0 commit comments