import signal
import socket
import urllib
import httplib

from gratia.common.config import ConfigProxy
from gratia.common.debug import DebugPrint, DebugPrintTraceback

# Hopefully these import lines go away when we can do relative imports
import gratia.common.ProxyUtil as ProxyUtil
import gratia.common.sandbox_mgmt as sandbox_mgmt
import gratia.common.response as response
import gratia.common.utils as utils
import gratia.common.global_state as global_state

Config = ConfigProxy()

# Instantiate a global connection object so it can be reused for
# the lifetime of the server Instantiate a 'connected' flag as
# well, because at times we cannot interrogate a connection
# object to see if it has been connected yet or not

connection = None
connected = False
connectionError = False
connectionRetries = 0
certificateRejected = False
certrequestRejected = False
__maxConnectionRetries__ = 2
__last_retry_time = None
__maximumDelay = 900
Beispiel #2
0
import signal
import socket
import urllib
import httplib

from gratia.common.config import ConfigProxy
from gratia.common.debug import DebugPrint, DebugPrintTraceback

# Hopefully these import lines go away when we can do relative imports
import gratia.common.ProxyUtil as ProxyUtil
import gratia.common.sandbox_mgmt as sandbox_mgmt
import gratia.common.response as response
import gratia.common.utils as utils
import gratia.common.global_state as global_state

Config = ConfigProxy()

# Instantiate a global connection object so it can be reused for
# the lifetime of the server Instantiate a 'connected' flag as
# well, because at times we cannot interrogate a connection
# object to see if it has been connected yet or not

connection = None
connected = False
connectionError = False
connectionRetries = 0
certificateRejected = False
certrequestRejected = False
__maxConnectionRetries__ = 2
__last_retry_time = None
__maximumDelay = 900
Beispiel #3
0
import re
import os
import sys
import glob
import time
import string
import shutil
import tarfile

from gratia.common.config import ConfigProxy
from gratia.common.file_utils import Mkdir, RemoveFile
from gratia.common.utils import niceNum
from gratia.common.debug import DebugPrint, DebugPrintTraceback, LogFileName
import gratia.common.global_state as global_state

Config = ConfigProxy()

outstandingRecord = {}
hasMoreOutstandingRecord = False
backupDirList = []
outstandingStagedRecordCount = 0
outstandingStagedTarCount = 0
outstandingRecordCount = 0
__maxFilesToReprocess__ = 100000


def QuarantineFile(filename, isempty):

    # If we have trouble with a file, let's quarantine it
    # If the quarantine reason is 'only' that the file is empty,
    # list the file as such.
Beispiel #4
0
import glob
import string
import xml.dom.minidom

from gratia.common.config import ConfigProxy
from gratia.common.debug import DebugPrint, DebugPrintTraceback
from gratia.common.xml_utils import safeParseXML, safeEncodeXML, XmlChecker
from gratia.common.file_utils import RemoveFile
from gratia.common.probe_details import ProbeDetails
import gratia.common.sandbox_mgmt as sandbox_mgmt
import gratia.common.bundle as bundle
import gratia.common.connect_utils as connect_utils
import gratia.common.global_state as global_state
import gratia.common.reprocess as reprocess

Config = ConfigProxy()

successfulHandshakes = 0
failedHandshakes = 0


def Send(record):

    try:
        DebugPrint(
            0, '***********************************************************')
        DebugPrint(4, 'DEBUG: In Send(record)')
        DebugPrint(4, 'DEBUG: Printing record to send')
        record.Print()
        DebugPrint(4, 'DEBUG: Printing record to send: OK')
import re
import os
import sys
import glob
import time
import string
import shutil
import tarfile

from gratia.common.config import ConfigProxy
from gratia.common.file_utils import Mkdir, RemoveFile
from gratia.common.utils import niceNum
from gratia.common.debug import DebugPrint, DebugPrintTraceback, LogFileName
import gratia.common.global_state as global_state

Config = ConfigProxy()

outstandingRecord = {}
hasMoreOutstandingRecord = False
backupDirList = []
outstandingStagedRecordCount = 0
outstandingStagedTarCount = 0
outstandingRecordCount = 0
__maxFilesToReprocess__ = 100000


def QuarantineFile(filename, isempty):

    # If we have trouble with a file, let's quarantine it
    # If the quarantine reason is 'only' that the file is empty,
    # list the file as such.