<s> from __future__ import absolute_import <EOL> from cell . actors import Actor <EOL> from cell . agents import dAgent <EOL> from kombu . entity import Exchange <EOL> __author__ = '<STR_LIT>' <EOL> class Group ( Actor ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , act_type , number , ** kwargs ) : <EOL> super ( Group , self ) . __init__ ( ** kwargs ) <EOL> self . state . act_type = act_type <EOL> self . state . number = number <EOL> class state ( object ) : <EOL> def config ( self , act_type , number ) : <EOL> agent = dAgent ( self . actor . connection ) <EOL> for _ in range ( <NUM_LIT:0> , number ) : <EOL> agent . spawn ( <EOL> act_type , <EOL> { '<STR_LIT>' : self . actor . inbox_scatter . name } ) <EOL> def get_scatter_exchange ( self ) : <EOL> """<STR_LIT>""" <EOL> return Exchange ( '<STR_LIT>' % ( self . name , self . id ) , <EOL> '<STR_LIT>' , auto_delete = True ) <EOL> def on_agent_ready ( self ) : <EOL> self . state . config ( self . state . act_type , self . state . number ) <EOL> def get_queues ( self ) : <EOL> return [ ] </s>
