Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start one more feedpuller #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ def parse_config(config_file):
config['hpf_secret'] = parser.get('hpfriends', 'secret')
config['hpf_port'] = parser.getint('hpfriends', 'port')
config['hpf_host'] = parser.get('hpfriends', 'host')

config['hpftwo_feeds'] = parser.get('hpfriends_two', 'channels').split(',')
config['hpftwo_ident'] = parser.get('hpfriends_two', 'ident')
config['hpftwo_secret'] = parser.get('hpfriends_two', 'secret')
config['hpftwo_port'] = parser.getint('hpfriends_two', 'port')
config['hpftwo_host'] = parser.get('hpfriends_two', 'host')

config['webapi_port'] = parser.getint('webapi', 'port')
config['webapi_host'] = parser.get('webapi', 'host')
Expand Down Expand Up @@ -117,6 +123,7 @@ def do_logging(file_log=None, loggly_token=None):

webapi = None
hpfriends_puller = None
hpfriendstwo_puller = None
normalizer = None

if args.reset:
Expand All @@ -131,7 +138,9 @@ def do_logging(file_log=None, loggly_token=None):
if not args.no_feedpuller:
logger.info("Spawning hpfriends feed puller.")
hpfriends_puller = feedpuller.FeedPuller(db, c['hpf_ident'], c['hpf_secret'], c['hpf_port'], c['hpf_host'], c['hpf_feeds'])
hpfriendstwo_puller = feedpuller.FeedPuller(db, c['hpftwo_ident'], c['hpftwo_secret'], c['hpftwo_port'], c['hpftwo_host'], c['hpftwo_feeds'])
greenlets['hpfriends-puller'] = gevent.spawn(hpfriends_puller.start_listening)
greenlets['hpfriendstwo-puller'] = gevent.spawn(hpfriendstwo_puller.start_listening)

if not args.no_webapi:
logger.info("Spawning web api.")
Expand Down