forked from Github/frigate
Compare commits
2 Commits
v0.8.0-rc4
...
v0.8.0-rc5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
714d76887d | ||
|
|
0c0e1416ff |
@@ -10,6 +10,7 @@ import signal
|
|||||||
import yaml
|
import yaml
|
||||||
from peewee_migrate import Router
|
from peewee_migrate import Router
|
||||||
from playhouse.sqlite_ext import SqliteExtDatabase
|
from playhouse.sqlite_ext import SqliteExtDatabase
|
||||||
|
from playhouse.sqliteq import SqliteQueueDatabase
|
||||||
|
|
||||||
from frigate.config import FrigateConfig
|
from frigate.config import FrigateConfig
|
||||||
from frigate.const import RECORD_DIR, CLIPS_DIR, CACHE_DIR
|
from frigate.const import RECORD_DIR, CLIPS_DIR, CACHE_DIR
|
||||||
@@ -117,13 +118,16 @@ class FrigateApp():
|
|||||||
self.detected_frames_queue = mp.Queue(maxsize=len(self.config.cameras.keys())*2)
|
self.detected_frames_queue = mp.Queue(maxsize=len(self.config.cameras.keys())*2)
|
||||||
|
|
||||||
def init_database(self):
|
def init_database(self):
|
||||||
self.db = SqliteExtDatabase(self.config.database.path)
|
migrate_db = SqliteExtDatabase(self.config.database.path)
|
||||||
|
|
||||||
# Run migrations
|
# Run migrations
|
||||||
del(logging.getLogger('peewee_migrate').handlers[:])
|
del(logging.getLogger('peewee_migrate').handlers[:])
|
||||||
router = Router(self.db)
|
router = Router(migrate_db)
|
||||||
router.run()
|
router.run()
|
||||||
|
|
||||||
|
migrate_db.close()
|
||||||
|
|
||||||
|
self.db = SqliteQueueDatabase(self.config.database.path)
|
||||||
models = [Event]
|
models = [Event]
|
||||||
self.db.bind(models)
|
self.db.bind(models)
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ export default function Sidebar() {
|
|||||||
<hr className="border-solid border-gray-500 mt-2" />
|
<hr className="border-solid border-gray-500 mt-2" />
|
||||||
<NavLink
|
<NavLink
|
||||||
className="self-end"
|
className="self-end"
|
||||||
href="https://github.com/blakeblackshear/frigate/blob/master/README.md"
|
href="https://blakeblackshear.github.io/frigate"
|
||||||
text="Documentation"
|
text="Documentation"
|
||||||
/>
|
/>
|
||||||
<NavLink className="self-end" href="https://github.com/blakeblackshear/frigate" text="GitHub" />
|
<NavLink className="self-end" href="https://github.com/blakeblackshear/frigate" text="GitHub" />
|
||||||
|
|||||||
Reference in New Issue
Block a user