mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-12 06:18: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/>.
|
# along with SickRage. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
import os.path
|
import os.path
|
||||||
import threading
|
import threading
|
||||||
@ -25,6 +26,7 @@ import sickbeard
|
|||||||
|
|
||||||
from sickbeard import logger, helpers, scene_numbering, common
|
from sickbeard import logger, helpers, scene_numbering, common
|
||||||
from dateutil import parser
|
from dateutil import parser
|
||||||
|
from sickbeard.common import cpu_presets
|
||||||
|
|
||||||
nameparser_lock = threading.Lock()
|
nameparser_lock = threading.Lock()
|
||||||
|
|
||||||
@ -111,6 +113,8 @@ class NameParser(object):
|
|||||||
self.showObj = curShow
|
self.showObj = curShow
|
||||||
break
|
break
|
||||||
|
|
||||||
|
time.sleep(cpu_presets[sickbeard.CPU_PRESET])
|
||||||
|
|
||||||
if not self.showObj:
|
if not self.showObj:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user