Skip to content

Instantly share code, notes, and snippets.

@dstuebe
Created June 1, 2012 15:46
Show Gist options
  • Save dstuebe/2853075 to your computer and use it in GitHub Desktop.
Save dstuebe/2853075 to your computer and use it in GitHub Desktop.
Create a data stream and log the content in a subscribed process
###$ bin/pycc --rel res/deploy/r2dm.yml
### To Create a data stream and get some data on the stream copy this and use %paste
from interface.services.dm.ipubsub_management_service import PubsubManagementServiceClient
pmsc = PubsubManagementServiceClient(node=cc.node)
stream_id = pmsc.create_stream(name='pfoo')
pid = cc.spawn_process(name='ctd_test',module='ion.processes.data.example_data_producer',cls='ExampleDataProducer',config={'process':{'stream_id':stream_id}})
pid = cc.spawn_process(name='ctd_test',module='ion.processes.data.stream_granule_logger',cls='StreamGranuleLogger',config={'process':{'stream_id':stream_id}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment