Permalink
Browse files

Fix example stream publisher

  • Loading branch information...
1 parent 59de20f commit b0644e734fbaf75e8947632c0c74c90552b7f286 Stephen Henrie committed Nov 27, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 examples/stream/publish.py
@@ -5,9 +5,13 @@ def start_ctd_publisher(container):
pubsubclient = PubsubManagementServiceClient(node=container.node)
- stream_id, route = pubsubclient.create_stream('ctd_publisher', exchange_point='science_data')
- pid = container.spawn_process('ctdpublisher', 'ion.processes.data.sinusoidal_stream_publisher','SinusoidalCtdPublisher',{'process':{'stream_id':stream_id}})
+ ctd_stream_def_id = pubsubclient.create_stream_definition(name='SBE37_CDM')
+
+ stream_id, route = pubsubclient.create_stream('ctd_publisher', exchange_point='science_data', stream_definition_id=ctd_stream_def_id)
+
+ pid = container.spawn_process('ctdpublisher', 'ion.processes.data.sinusoidal_stream_publisher','SinusoidalCtdPublisher',
+ {'process':{'stream_id':stream_id}})
print 'stream_id=' + stream_id
print 'pid=' + pid

0 comments on commit b0644e7

Please sign in to comment.