ooici/coi-services — pull request #116 by dstuebe (2012-05-09 01:54:42+00:00)
Title: Granule publish

Example Data producer process and Logging Subscriber process using the new granule API in pyon.

$ 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_ctd_data_producer',cls='ExampleCTDDataProducer',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}})