Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: da8edd91ee
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 19 lines (14 sloc) 0.567 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__

from Dispatcher import Dispatcher
from SharedScheduler import scheduler
import exampleConfig


def fooHandler(name, data):
    print 'got "%s" "%s"' % (name, data)

com = Dispatcher(moduleName='exampleSubscriber')
com.connectToNotificationService(exampleConfig.NOTIFY_ENDPOINT)
com.subscribe('%s:foo' % exampleConfig.PROTOCOL, fooHandler)
scheduler.runForever()
Something went wrong with that request. Please try again.