[seiscomp, scanloc] Install, add .gitignore
This commit is contained in:
30
share/templates/seedlink/ewexport/setup.py
Normal file
30
share/templates/seedlink/ewexport/setup.py
Normal file
@ -0,0 +1,30 @@
|
||||
import os
|
||||
|
||||
'''
|
||||
Plugin handler for the Earthworm export plugin.
|
||||
'''
|
||||
class SeedlinkPluginHandler:
|
||||
# Create defaults
|
||||
def __init__(self): pass
|
||||
|
||||
def push(self, seedlink):
|
||||
# Check and set defaults
|
||||
try: hb_msg = seedlink.param('sources.ewexport.heartbeat.message')
|
||||
except:
|
||||
hb_msg = 'alive'
|
||||
seedlink.setParam('sources.ewexport.heartbeat.message', hb_msg)
|
||||
|
||||
try: hb_rate = seedlink.param('sources.ewexport.heartbeat.rate')
|
||||
except:
|
||||
hb_rate = 120
|
||||
seedlink.setParam('sources.ewexport.heartbeat.rate', hb_rate)
|
||||
|
||||
host = seedlink._get('sources.ewexport.address')
|
||||
port = seedlink._get('sources.ewexport.port')
|
||||
|
||||
return host + ":" + port
|
||||
|
||||
|
||||
# Flush does nothing
|
||||
def flush(self, seedlink):
|
||||
pass
|
Reference in New Issue
Block a user