mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-10 15:32:38 -07:00
Cancel processing exports on startup
This commit is contained in:
parent
42856e5ac8
commit
61c692ad4e
2 changed files with 10 additions and 2 deletions
|
@ -45,7 +45,7 @@ if PYTHON2:
|
||||||
import common
|
import common
|
||||||
import database
|
import database
|
||||||
import datafactory
|
import datafactory
|
||||||
import helpers
|
import exporter
|
||||||
import libraries
|
import libraries
|
||||||
import logger
|
import logger
|
||||||
import mobile_app
|
import mobile_app
|
||||||
|
@ -65,7 +65,7 @@ else:
|
||||||
from plexpy import common
|
from plexpy import common
|
||||||
from plexpy import database
|
from plexpy import database
|
||||||
from plexpy import datafactory
|
from plexpy import datafactory
|
||||||
from plexpy import helpers
|
from plexpy import exporter
|
||||||
from plexpy import libraries
|
from plexpy import libraries
|
||||||
from plexpy import logger
|
from plexpy import logger
|
||||||
from plexpy import mobile_app
|
from plexpy import mobile_app
|
||||||
|
@ -535,6 +535,9 @@ def start():
|
||||||
notification_handler.start_threads(num_threads=CONFIG.NOTIFICATION_THREADS)
|
notification_handler.start_threads(num_threads=CONFIG.NOTIFICATION_THREADS)
|
||||||
notifiers.check_browser_enabled()
|
notifiers.check_browser_enabled()
|
||||||
|
|
||||||
|
# Cancel processing exports
|
||||||
|
exporter.cancel_exports()
|
||||||
|
|
||||||
if CONFIG.FIRST_RUN_COMPLETE:
|
if CONFIG.FIRST_RUN_COMPLETE:
|
||||||
activity_pinger.connect_server(log=True, startup=True)
|
activity_pinger.connect_server(log=True, startup=True)
|
||||||
|
|
||||||
|
|
|
@ -1068,6 +1068,11 @@ def delete_all_exports():
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
def cancel_exports():
|
||||||
|
db = database.MonitorDatabase()
|
||||||
|
db.action('UPDATE exports SET complete = -1 WHERE complete = 0')
|
||||||
|
|
||||||
|
|
||||||
def get_export_datatable(section_id=None, rating_key=None, kwargs=None):
|
def get_export_datatable(section_id=None, rating_key=None, kwargs=None):
|
||||||
default_return = {'recordsFiltered': 0,
|
default_return = {'recordsFiltered': 0,
|
||||||
'recordsTotal': 0,
|
'recordsTotal': 0,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue