Skip to content

Commit

Permalink
try something
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Dec 4, 2023
1 parent 93363a2 commit 9d2a087
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/pds/src/actor-store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { CID } from 'multiformats/cid'
import DiskBlobStore from '../disk-blobstore'
import { mkdir } from 'fs/promises'
import { ActorStoreConfig } from '../config'
import { retrySqlite } from '../db'

type ActorStoreResources = {
blobstore: (did: string) => BlobStore
Expand Down Expand Up @@ -67,7 +68,9 @@ export class ActorStore {

const db = getDb(dbLocation, this.cfg.disableWalAutoCheckpoint)
try {
await db.ensureReady()
await retrySqlite(() =>
db.db.selectFrom('account_pref').selectAll().limit(1).execute(),
)
} catch (err) {
db.close()
throw err
Expand Down

0 comments on commit 9d2a087

Please sign in to comment.