added new return code (93) for post-processing script to indicate successful processing; that results in cleaning up of download queue if option <ParCleanupQueue> is active

This commit is contained in:
Andrey Prygunkov
2009-04-23 20:39:07 +00:00
parent b28c2ae735
commit 10269dc779
3 changed files with 14 additions and 4 deletions

View File

@@ -54,6 +54,7 @@ extern char* (*szEnvironmentVariables)[];
static const int POSTPROCESS_PARCHECK_CURRENT = 91;
static const int POSTPROCESS_PARCHECK_ALL = 92;
static const int POSTPROCESS_ALLOK = 93;
#ifndef WIN32
#define CHILD_WATCHDOG 1
@@ -647,9 +648,16 @@ void PostScriptController::Run()
SetEnvVar(szVarname, pParameter->GetValue());
}
#ifndef DISABLE_PARCHECK
int iResult = Execute();
if (iResult == POSTPROCESS_PARCHECK_ALL)
if (iResult == POSTPROCESS_ALLOK)
{
info("%s sucessful", szInfoName);
m_pPostInfo->SetRequestParCleanup(true);
}
#ifndef DISABLE_PARCHECK
else if (iResult == POSTPROCESS_PARCHECK_ALL)
{
if (m_pPostInfo->GetParCheck())
{
@@ -681,8 +689,6 @@ void PostScriptController::Run()
m_pPostInfo->SetRequestParCheck(PostInfo::rpCurrent);
}
}
#else
Execute();
#endif
m_pPostInfo->SetStage(PostInfo::ptFinished);