mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-05 17:05:03 -05:00
Added timer in to reduce cpu usage during release name parsing
This commit is contained in:
parent
fcc91bedd9
commit
836722d6cd
@ -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 New Issue
Block a user