void BaseExecutionContext::onShutdownPostSend() {
  ServerStats::SetThreadMode(ServerStats::PostProcessing);
  try {
    try {
      ServerStatsHelper ssh("psp", ServerStatsHelper::TRACK_HWINST);
      if (!m_shutdowns.isNull()) {
        if (m_shutdowns.exists(PostSend)) {
          executeFunctions(m_shutdowns[PostSend]);
          m_shutdowns.remove(PostSend);
        }
        if (m_shutdowns.exists(CleanUp)) {
          executeFunctions(m_shutdowns[CleanUp]);
          m_shutdowns.remove(CleanUp);
        }
      }
    } catch (const ExitException &e) {
      // do nothing
    } catch (const Exception &e) {
      onFatalError(e);
    } catch (const Object &e) {
      onUnhandledException(e);
    }
  } catch (...) {
    Logger::Error("unknown exception was thrown from psp");
  }
  ServerStats::SetThreadMode(ServerStats::Idling);
}
Example #2
0
void ExecutionContext::onShutdownPostSend() {
  Array &funcs = s_request_data->data->shutdowns;
  if (!funcs.isNull()) {
    if (funcs.exists(PostSend)) {
      executeFunctions(funcs[PostSend]);
      funcs.remove(PostSend);
    }
    if (funcs.exists(CleanUp)) {
      executeFunctions(funcs[CleanUp]);
      funcs.remove(CleanUp);
    }
  }
}
void BaseExecutionContext::onShutdownPreSend() {
  if (!m_shutdowns.isNull() && m_shutdowns.exists(ShutDown)) {
    executeFunctions(m_shutdowns[ShutDown]);
    m_shutdowns.remove(ShutDown);
  }
  obFlushAll(); // in case obStart was called without obFlush
}
Example #4
0
void ExecutionContext::onShutdownPreSend() {
  Array &funcs = s_request_data->data->shutdowns;
  if (!funcs.isNull() && funcs.exists(ShutDown)) {
    executeFunctions(funcs[ShutDown]);
    funcs.remove(ShutDown);
  }
  obFlushAll(); // in case obStart was called without obFlush
}
Example #5
0
void ExecutionContext::onTick() {
  executeFunctions(s_request_data->data->ticks);
}