forked from goodboy/tractor
				
			Formatting
							parent
							
								
									897ab79946
								
							
						
					
					
						commit
						81f3558494
					
				| 
						 | 
					@ -4,7 +4,6 @@ Inter-process comms abstractions
 | 
				
			||||||
import typing
 | 
					import typing
 | 
				
			||||||
from typing import Any, Tuple, Optional
 | 
					from typing import Any, Tuple, Optional
 | 
				
			||||||
from functools import partial
 | 
					from functools import partial
 | 
				
			||||||
import inspect
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
import msgpack
 | 
					import msgpack
 | 
				
			||||||
import trio
 | 
					import trio
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,9 +29,13 @@ async def fan_out_to_ctxs(
 | 
				
			||||||
        return tuple(topics2ctxs.keys())
 | 
					        return tuple(topics2ctxs.keys())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    agen = pub_async_gen_func(get_topics=get_topics)
 | 
					    agen = pub_async_gen_func(get_topics=get_topics)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    async with aclosing(agen) as pub_gen:
 | 
					    async with aclosing(agen) as pub_gen:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        async for published in pub_gen:
 | 
					        async for published in pub_gen:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ctx_payloads: Dict[str, Any] = {}
 | 
					            ctx_payloads: Dict[str, Any] = {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            for topic, data in published.items():
 | 
					            for topic, data in published.items():
 | 
				
			||||||
                log.debug(f"publishing {topic, data}")
 | 
					                log.debug(f"publishing {topic, data}")
 | 
				
			||||||
                # build a new dict packet or invoke provided packetizer
 | 
					                # build a new dict packet or invoke provided packetizer
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue