mirror of
https://github.com/zvx-echo6/central.git
synced 2026-08-26 17:31:39 +00:00
Compare commits
1 commit
main
...
supervisor
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
238de7a9a1 |
2 changed files with 15 additions and 0 deletions
|
|
@ -126,6 +126,10 @@ class SatOrbitsAdapter(SourceAdapter):
|
||||||
# Skip the publish-time/archive bbox filter (v0.14.2). Keep in sync with
|
# Skip the publish-time/archive bbox filter (v0.14.2). Keep in sync with
|
||||||
# archive._BYPASS_BBOX_ADAPTERS.
|
# archive._BYPASS_BBOX_ADAPTERS.
|
||||||
bypass_bbox_filter = True
|
bypass_bbox_filter = True
|
||||||
|
# Dedup IDs are "<norad_id>:<propagation_iso>" -- unique per second by design,
|
||||||
|
# so a 14-day window accumulates rows unnecessarily. TLEs are stable for days,
|
||||||
|
# so 2 days is sufficient to catch re-emitted orbits without bloating the table.
|
||||||
|
dedup_sweep_days = 2
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
@ -147,6 +151,10 @@ class SatOrbitsAdapter(SourceAdapter):
|
||||||
|
|
||||||
async def startup(self) -> None:
|
async def startup(self) -> None:
|
||||||
self._db = sqlite3.connect(self._cursor_db_path)
|
self._db = sqlite3.connect(self._cursor_db_path)
|
||||||
|
# WAL + NORMAL sync: eliminates per-commit fsync overhead on cursors.db.
|
||||||
|
# WAL mode is file-level persistent; applies to all adapters on this DB.
|
||||||
|
self._db.execute("PRAGMA journal_mode=WAL")
|
||||||
|
self._db.execute("PRAGMA synchronous=NORMAL")
|
||||||
self._db.execute(_DEDUP_DDL)
|
self._db.execute(_DEDUP_DDL)
|
||||||
self._db.execute(
|
self._db.execute(
|
||||||
"CREATE INDEX IF NOT EXISTS published_ids_last_seen ON published_ids (last_seen)"
|
"CREATE INDEX IF NOT EXISTS published_ids_last_seen ON published_ids (last_seen)"
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,9 @@ class SatPositionsAdapter(SourceAdapter):
|
||||||
# queries. Skip the publish-time/archive bbox filter (v0.14.2). Keep in sync
|
# queries. Skip the publish-time/archive bbox filter (v0.14.2). Keep in sync
|
||||||
# with archive._BYPASS_BBOX_ADAPTERS.
|
# with archive._BYPASS_BBOX_ADAPTERS.
|
||||||
bypass_bbox_filter = True
|
bypass_bbox_filter = True
|
||||||
|
# Dedup IDs are "<norad_id>:<position_iso>" -- unique per second by design,
|
||||||
|
# so a 14-day window accumulates ~3.5M rows unnecessarily. 1 day is enough.
|
||||||
|
dedup_sweep_days = 1
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
|
@ -155,6 +158,10 @@ class SatPositionsAdapter(SourceAdapter):
|
||||||
|
|
||||||
async def startup(self) -> None:
|
async def startup(self) -> None:
|
||||||
self._db = sqlite3.connect(self._cursor_db_path)
|
self._db = sqlite3.connect(self._cursor_db_path)
|
||||||
|
# WAL + NORMAL sync: eliminates per-commit fsync overhead on cursors.db.
|
||||||
|
# WAL mode is file-level persistent; applies to all adapters on this DB.
|
||||||
|
self._db.execute("PRAGMA journal_mode=WAL")
|
||||||
|
self._db.execute("PRAGMA synchronous=NORMAL")
|
||||||
self._db.execute(_DEDUP_DDL)
|
self._db.execute(_DEDUP_DDL)
|
||||||
self._db.execute(
|
self._db.execute(
|
||||||
"CREATE INDEX IF NOT EXISTS published_ids_last_seen ON published_ids (last_seen)"
|
"CREATE INDEX IF NOT EXISTS published_ids_last_seen ON published_ids (last_seen)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue