Skip to content

Commit

Permalink
revert changes to mapeo manager
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaclennan committed Oct 22, 2024
1 parent 4fc2599 commit 7958a4b
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/mapeo-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ export class MapeoManager extends TypedEmitter {
#loggerBase
#l
#defaultConfigPath
#sqlite

/**
* @param {Object} opts
Expand Down Expand Up @@ -150,11 +149,11 @@ export class MapeoManager extends TypedEmitter {
this.#l = Logger.create('manager', logger)
this.#dbFolder = dbFolder
this.#projectMigrationsFolder = projectMigrationsFolder
const sqlite = (this.#sqlite = new Database(
const sqlite = new Database(
dbFolder === ':memory:'
? ':memory:'
: path.join(dbFolder, CLIENT_SQLITE_FILE_NAME)
))
)
this.#db = drizzle(sqlite)
migrate(this.#db, { migrationsFolder: clientMigrationsFolder })

Expand Down Expand Up @@ -952,13 +951,6 @@ export class MapeoManager extends TypedEmitter {
await pTimeout(this.#fastify.ready(), { milliseconds: 1000 })
return (await this.#getMediaBaseUrl('maps')) + '/style.json'
}

async close() {
for (const project of this.#activeProjects.values()) {
await project.close()
}
this.#sqlite.close()
}
}

// We use the `protomux` property of connected peers internally, but we don't
Expand Down

0 comments on commit 7958a4b

Please sign in to comment.