To account for the Date Updated column in the adlist table adding a comma to the adlist to be imported into the database. This was causing intermittent failures on updates and therefore no domains would be blocked.
Signed-off-by: user <user@fedbrew.home>
Date: Sun Dec 6 06:03:30 2020 -0500
Committer: user <user@fedbrew.home>
On branch fix/gravity_date_updated
Your branch and 'origin/fix/gravity_date_updated' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
Changes to be committed:
modified: gravity.sh
Signed-off-by: user <user@fedbrew.home>
* Also display non-fatal warnings during the database importing. Previously, we have only show warnings when there were also errors (errors are always fatal).
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Ensure there is always a newline on the last line.
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Stickler linting
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
* Move sed command into subroutine to avoid code duplication.
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Also unify comments.
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Also unify comments.
Signed-off-by: DL6ER <dl6er@dl6er.de>
Co-authored-by: Dan Schaper <dan@glacialmagma.com>
* Gravity performance improvements.
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Do not move downloaded lists into migration_backup directory.
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Do not (strictly) sort domains. Random-leaf access is faster than always-last-leaf access (on average).
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Append instead of overwrite gravity_new collection list.
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Rename table gravity_new to gravity_temp to clarify that this is only an intermediate table.
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Add timers for each of the calls to compute intense parts. They are to be removed before this finally hits the release/v5.0 branch.
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Fix legacy list files import. It currently doesn't work when the gravity database has already been updated to using the single domainlist table.
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Simplify database_table_from_file(), remove all to this function for gravity lost downloads.
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Update gravity.db.sql to version 10 to have newle created databases already reflect the most recent state.
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Create second gravity database and swap them on success. This has a number of advantages such as instantaneous gravity updates (as seen from FTL) and always available gravity blocking. Furthermore, this saves disk space as the old database is removed on completion.
* Add timing output for the database swapping SQLite3 call.
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Explicitly generate index as a separate process.
Signed-off-by: DL6ER <dl6er@dl6er.de>
* Remove time measurements.
Signed-off-by: DL6ER <dl6er@dl6er.de>