Skip to content

Commit

Permalink
Disable PP wrapper, since it makes NzbToMedia to not function properly
Browse files Browse the repository at this point in the history
  • Loading branch information
duramato authored and fernandog committed Apr 8, 2016
1 parent 1361c6a commit 267a9ae
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions sickbeard/processTV.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,25 +142,25 @@ def logHelper(logMessage, logLevel=logger.INFO):
return logMessage + u"\n"


def OneRunPP():
isRunning = [False]

def decorate(func):
@wraps(func)
def func_wrapper(*args, **kargs):
if isRunning[0]:
return logHelper(u'Post processor is already running', logger.WARNING)
#def OneRunPP():
# isRunning = [False]
#
# def decorate(func):
# @wraps(func)
# def func_wrapper(*args, **kargs):
# if isRunning[0]:
# return logHelper(u'Post processor is already running', logger.WARNING)

isRunning[0] = True
ret = func(*args, **kargs)
isRunning[0] = False
return ret
return func_wrapper
return decorate
# isRunning[0] = True
# ret = func(*args, **kargs)
# isRunning[0] = False
# return ret
# return func_wrapper
# return decorate


# pylint: disable=too-many-arguments,too-many-branches,too-many-statements,too-many-locals
@OneRunPP()
#@OneRunPP()
def processDir(dirName, nzbName=None, process_method=None, force=False, is_priority=None, delete_on=False, failed=False, proc_type="auto"):
"""
Scans through the files in dirName and processes whatever media files it finds
Expand Down

0 comments on commit 267a9ae

Please sign in to comment.