2020-08-22 19:44:28 -07:00
|
|
|
from __future__ import division, print_function, unicode_literals
|
|
|
|
|
|
|
|
from datetime import datetime
|
|
|
|
from cps.services.worker import CalibreTask, STAT_FINISH_SUCCESS
|
|
|
|
|
|
|
|
class TaskUpload(CalibreTask):
|
|
|
|
def __init__(self, taskMessage):
|
|
|
|
super().__init__(taskMessage)
|
|
|
|
self.start_time = self.end_time = datetime.now()
|
|
|
|
self.stat = STAT_FINISH_SUCCESS
|
2020-08-22 20:35:48 -07:00
|
|
|
self.progress = 1
|
2020-08-22 19:44:28 -07:00
|
|
|
|
|
|
|
def run(self, worker_thread):
|
|
|
|
"""Upload task doesn't have anything to do, it's simply a way to add information to the task list"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
@property
|
|
|
|
def name(self):
|
|
|
|
return "Upload"
|