Exemplo n.º 1
0
    def __init__(self):
        Application.__init__(self, len(sys.argv), sys.argv)
        self.setMessagingEnabled(False)
        self.setDatabaseEnabled(True, True)
        self.setRecordStreamEnabled(True)

        self._serverRoot = os.path.dirname(__file__)
        self._listenAddress = '0.0.0.0'  # all interfaces
        self._port = 8080
        self._connections = 5
        self._queryObjects = 100000  # maximum number of objects per query
        self._realtimeGap = None  # minimum data age: 5min
        self._samplesM = None  # maximum number of samples per query
        self._htpasswd = '@CONFIGDIR@/fdsnws.htpasswd'
        self._accessLogFile = ''

        self._allowRestricted = True
        self._serveDataSelect = True
        self._serveEvent = True
        self._serveStation = True

        self._hideAuthor = False
        self._evaluationMode = None
        self._eventTypeWhitelist = None
        self._eventTypeBlacklist = None

        self._accessLog = None
        self._inv = None

        self._fileNamePrefix = 'fdsnws'

        # Leave signal handling to us
        Application.HandleSignals(False, False)
Exemplo n.º 2
0
	def __init__(self):
		Application.__init__(self, len(sys.argv), sys.argv)
		self.setMessagingEnabled(False)
		self.setDatabaseEnabled(True, True)
		self.setRecordStreamEnabled(True)

		self._serverRoot    = os.path.dirname(__file__)
		self._listenAddress = '0.0.0.0' # all interfaces
		self._port          = 8080
		self._connections   = 5
		self._queryObjects  = 100000    # maximum number of objects per query
		self._realtimeGap   = None      # minimum data age: 5min
		self._samplesM      = None      # maximum number of samples per query
		self._htpasswd      = '@CONFIGDIR@/fdsnws.htpasswd'
		self._accessLogFile = ''

		self._allowRestricted   = True
		self._serveDataSelect   = True
		self._serveEvent        = True
		self._serveStation      = True

		self._hideAuthor            = False
		self._evaluationMode        = None
		self._eventTypeWhitelist    = None
		self._eventTypeBlacklist    = None

		self._accessLog     = None
		self._inv           = None

		self._fileNamePrefix = 'fdsnws'

		# Leave signal handling to us
		Application.HandleSignals(False, False)
Exemplo n.º 3
0
    def __init__(self, argc, argv):
        # Log all messages to a file for S3
        self._logfile_for_s3 = NamedTemporaryFile()
        self._logger_for_s3 = Logging.FileOutput(self._logfile_for_s3.name)
        for level in ('notice', 'error', 'warning', 'info', 'debug'):
            self._logger_for_s3.subscribe(Logging.getGlobalChannel(level))

        Application.__init__(self, argc, argv)

        # default location to write outputs to
        self.output = settings.OUTPUT_DIR
        self.filename = None
        self.mag_type = None
        self.mag_value = None
        self.server = 'IRIS'
        self.fdsn_client = None
        self.networks = 'ALL'
        self.region = 'not specified'
        self.evid = None
        self.resultid = None
        self.notificationemail = None
        self.fromemail = None
        self.email_aws_region = None
        self.email_method = 'ses'

        self.email_subject_postfix = ''
        self.email_subject_prefix = ''

        self.smtp_server = None
        self.smtp_port = 25
        self.smtp_ssl = False
        self.smtp_tls = False
        self.smtp_user = None
        self.smtp_password = None

        self.write_s3 = False
        self.bucket_name = None
        self.agency = 'GA'
        self.make_maps = True
        self.overwrite = False
        self.save_waveforms = None
        self.save_inventory = None
        self.waveforms = None
        self.inventory = None

        self.eqinfo: Optional[model.Event] = None

        # enable messaging support
        self.setMessagingEnabled(True)

        # disable database access
        self.setDatabaseEnabled(False, False)

        # default spread username
        self.setMessagingUsername("gawphase")

        # send all objects to the focal mechanism group
        self.setPrimaryMessagingGroup("FOCMECH")
Exemplo n.º 4
0
    def __init__(self):
        Application.__init__(self, len(sys.argv), sys.argv)
        self.setMessagingEnabled(True)
        self.setDatabaseEnabled(True, True)
        self.setRecordStreamEnabled(True)
        self.setLoadInventoryEnabled(True)

        self._serverRoot = os.path.dirname(__file__)
        self._listenAddress = '0.0.0.0'  # all interfaces
        self._port = 8080
        self._connections = 5
        self._queryObjects = 100000    # maximum number of objects per query
        self._realtimeGap = None      # minimum data age: 5min
        self._samplesM = None      # maximum number of samples per query
        self._recordBulkSize = 102400    # desired record bulk size
        self._htpasswd = '@CONFIGDIR@/fdsnws.htpasswd'
        self._accessLogFile = ''
        self._requestLogFile = ''

        self._allowRestricted = True
        self._useArclinkAccess = False
        self._serveDataSelect = True
        self._serveEvent = True
        self._serveStation = True
        self._serveAvailability = False
        self._daEnabled = False
        self._daCacheDuration = 300
        self._daCache = None
        self._openStreams = None
        self._daRepositoryName = 'primary'
        self._daDCCName = 'DCC'

        self._hideAuthor = False
        self._evaluationMode = None
        self._eventTypeWhitelist = None
        self._eventTypeBlacklist = None
        self._eventFormats = None
        self._stationFilter = None
        self._dataSelectFilter = None
        self._debugFilter = False

        self._accessLog = None

        self._fileNamePrefix = 'fdsnws'

        self._trackdbEnabled = False
        self._trackdbDefaultUser = '******'

        self._authEnabled = False
        self._authGnupgHome = '@ROOTDIR@/var/lib/gpg'
        self._authBlacklist = []

        self._userdb = UserDB()
        self._access = Access()

        # Leave signal handling to us
        Application.HandleSignals(False, False)
Exemplo n.º 5
0
	def __init__(self):
		Application.__init__(self, len(sys.argv), sys.argv)
		self.setMessagingEnabled(True)
		self.setDatabaseEnabled(True, True)
		self.setRecordStreamEnabled(True)
		self.setLoadInventoryEnabled(True)

		self._serverRoot     = os.path.dirname(__file__)
		self._listenAddress  = '0.0.0.0' # all interfaces
		self._port           = 8080
		self._connections    = 5
		self._queryObjects   = 100000    # maximum number of objects per query
		self._realtimeGap    = None      # minimum data age: 5min
		self._samplesM       = None      # maximum number of samples per query
		self._recordBulkSize = 102400    # desired record bulk size
		self._htpasswd       = '@CONFIGDIR@/fdsnws.htpasswd'
		self._accessLogFile  = ''

		self._allowRestricted   = True
		self._useArclinkAccess  = False
		self._serveDataSelect   = True
		self._serveEvent        = True
		self._serveStation      = True

		self._hideAuthor            = False
		self._evaluationMode        = None
		self._eventTypeWhitelist    = None
		self._eventTypeBlacklist    = None
		self._eventFormats          = None
		self._stationFilter         = None
		self._dataSelectFilter      = None
		self._debugFilter           = False

		self._accessLog     = None

		self._fileNamePrefix = 'fdsnws'

		self._trackdbEnabled = False
		self._trackdbDefaultUser = '******'

		self._authEnabled   = False
		self._authGnupgHome = '@ROOTDIR@/var/lib/gpg'
		self._authBlacklist = []

		self._userdb        = UserDB()
		self._access        = Access()

		# Leave signal handling to us
		Application.HandleSignals(False, False)
Exemplo n.º 6
0
    def __init__(self, argc, argv):
        Application.__init__(self, argc, argv)
        self.setMessagingEnabled(True)
        self.setDatabaseEnabled(True, True)
        self.addMessagingSubscription("EVENT")
        self.addMessagingSubscription("LOCATION")
        self.addMessagingSubscription("MAGNITUDE")
        self.addMessagingSubscription("FOCMECH")
        self.setAutoApplyNotifierEnabled(True)

        # object buffers
        self._state = {}
        self._origin = {}
        self._magnitude = {}
        self._focalmechanism = {}

        self._cleanupCounter = 0
        self._xdebug = False
        self._cleanup_interval = 3600.
Exemplo n.º 7
0
    def __init__(self, argc, argv):
        Application.__init__(self, argc, argv)
        self.setMessagingEnabled(True)
        self.setDatabaseEnabled(True, True)
        self.addMessagingSubscription("EVENT")
        self.addMessagingSubscription("LOCATION")
        self.addMessagingSubscription("MAGNITUDE")
        self.addMessagingSubscription("FOCMECH")
        self.setAutoApplyNotifierEnabled(True)

        # object buffers
        self._state = {}
        self._origin = {}
        self._magnitude = {}
        self._focalmechanism = {}

        self._cleanupCounter = 0
        self._xdebug = False
        self._cleanup_interval = 3600.