only scan once per day
This commit is contained in:
parent
a27ef9701f
commit
853f6cdc0c
1 changed files with 4 additions and 1 deletions
|
@ -36,7 +36,10 @@ class Tasks(Thread):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.load_tasks()
|
self.load_tasks()
|
||||||
|
if time.mktime(time.gmtime()) - settings.server.get('last_scan', 0) > 24*60*60:
|
||||||
|
settings.server['last_scan'] = time.mktime(time.gmtime())
|
||||||
self.queue('scan')
|
self.queue('scan')
|
||||||
|
|
||||||
import item.scan
|
import item.scan
|
||||||
from item.models import sync_metadata, get_preview, get_cover
|
from item.models import sync_metadata, get_preview, get_cover
|
||||||
from user.models import (
|
from user.models import (
|
||||||
|
|
Loading…
Reference in a new issue