mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 00:43:37 +00:00
Added timer in to reduce cpu usage during release name parsing
This commit is contained in:
parent
fcc91bedd9
commit
836722d6cd
1 changed files with 4 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
# along with SickRage. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import re
|
||||
import time
|
||||
import datetime
|
||||
import os.path
|
||||
import threading
|
||||
|
@ -25,6 +26,7 @@ import sickbeard
|
|||
|
||||
from sickbeard import logger, helpers, scene_numbering, common
|
||||
from dateutil import parser
|
||||
from sickbeard.common import cpu_presets
|
||||
|
||||
nameparser_lock = threading.Lock()
|
||||
|
||||
|
@ -111,6 +113,8 @@ class NameParser(object):
|
|||
self.showObj = curShow
|
||||
break
|
||||
|
||||
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||
|
||||
if not self.showObj:
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in a new issue