boramalper / magnetico

Autonomous (self-hosted) BitTorrent DHT search engine suite.
http://labs.boramalper.org/magnetico/
GNU Affero General Public License v3.0
3.06k stars 343 forks source link

Autorestart when error in importing magnets? #149

Open scriptzteam opened 7 years ago

scriptzteam commented 7 years ago

A lot of time i see this and losting magnets due to it. Can we make something like a restart for whole magneticod if "Could NOT commit metadata to the database!" error appears?

2017-09-04 16:20:42,061  ERROR     Could NOT commit metadata to the database! (12490 metadata are pending)
Traceback (most recent call last):
  File "/root/.local/lib/python3.5/site-packages/magneticod/persistence.py", line 116, in __commit_metadata
    self.__pending_metadata
sqlite3.IntegrityError: UNIQUE constraint failed: torrents.info_hash
mweinelt commented 7 years ago

Better idea: if bulk commit fails, try to commit torrents one by one, drop the one's that are failing.

skobkin commented 5 years ago

Isn't restarting the tool is NOT the responsibility of that tool?

Wouldn't it be better to use systemd/docker(restart=always) or just Bash while to restart magneticod?