Merge pull request #2 from TinfoilSubmarine/create-posts-on-first-run
Commit on DB object creation to ensure table posts is created
This commit is contained in:
commit
3d393c7577
|
@ -52,6 +52,7 @@ class PostFetcher:
|
||||||
self._rl_handler = HandleRateLimits(self._http)
|
self._rl_handler = HandleRateLimits(self._http)
|
||||||
self._db = await stack.enter_async_context(aiosqlite.connect(self.config['db_path']))
|
self._db = await stack.enter_async_context(aiosqlite.connect(self.config['db_path']))
|
||||||
await self._maybe_run_migrations()
|
await self._maybe_run_migrations()
|
||||||
|
await self._db.commit()
|
||||||
self._db.row_factory = aiosqlite.Row
|
self._db.row_factory = aiosqlite.Row
|
||||||
self._ctx_stack = stack
|
self._ctx_stack = stack
|
||||||
return self
|
return self
|
||||||
|
|
Loading…
Reference in New Issue