Documentation for pulsar 0.9.2. For development docs, go here.

Asynchronous Shell

An asynchronous shell for experimenting with pulsar on the command line. To use write a little script, lets call it pshell.py:

from pulsar.apps.shell import PulsarShell

if __name__ == '__main__':
    PulsarShell().start()

And run it:

python pshell.py

The shell has already pulsar, get_actor(), spawn(), send() and the Actor class in the global dictionary:

>>> pulsar.__version__
0.8.0
>>> actor = get_actor()
>>> actor.info_state
'running'
>>> a = spawn()
>>> a.done()
True
>>> proxy = a.result()

Implementation

class pulsar.apps.shell.PulsarShell(callable=None, load_config=True, **params)[source]
monitor_start(monitor)[source]

make sure workers and thread_workers are both set to 1 and concurrency is thread.

worker_start(worker, exc=None)[source]

When the worker starts, create the thread_pool and send the interact() method to it.

interact(worker)[source]

Handled by the Actor.thread_pool



Table Of Contents

Previous topic

Test Suite

Next topic

Pulsar Data Store Server

This Page