with the intention that they are used in forked worker processes. """ import errno import signal import subprocess import sys import tarfile import tempfile import wal_e.log_help as log_help from wal_e.exception import UserException, UserCritical from wal_e.piper import pipe, pipe_wait, popen_sp logger = log_help.get_logger('wal_e.worker') PSQL_BIN = 'psql' ENCODE_BIN = 'pg_wal_encrypt' DECODE_BIN = 'pg_wal_decrypt' S3CMD_BIN = 's3cmd' MBUFFER_BIN = 'mbuffer' # BUFSIZE_HT: Buffer Size, High Throughput # # This is set conservatively because small systems can end up being # unhappy with too much memory usage in buffers. BUFSIZE_HT = 128 * 8192
import wal_e.worker as worker import wal_e.tar_partition as tar_partition import wal_e.log_help as log_help from wal_e.exception import UserException, UserCritical from wal_e.piper import popen_sp from wal_e.worker import PSQL_BIN, ENCODE_BIN, DECODE_BIN, S3CMD_BIN, MBUFFER_BIN from wal_e.worker import check_call_wait_sigint # TODO: Make controllable from userland log_help.configure( level=logging.DEBUG, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s') logger = log_help.get_logger('wal_e.main') # Provides guidence in object names as to the version of the file # structure. FILE_STRUCTURE_VERSION = '005' class UTC(datetime.tzinfo): """ UTC timezone Adapted from a Python example """ ZERO = datetime.timedelta(0)