Ginés Martínez Sánchez avatar Ginés Martínez Sánchez committed 77e0259 Draft

broadcast and event on new dynamic routes. version 0.6.1

Comments (0)

Files changed (3)


 A python library to do development based in Finite State Machines.
-__version__ = '0.6.0'
+__version__ = '0.6.1'
 __title__ = 'ginsfsm'
 __author__ = 'Ginés Martínez'
 __license__ = 'MIT License'


 To test it you must use the sockjs tests:
+I use this command to test:
+SOCKJS_URL=http://localhost:8080/__test_sockjs__ ./venv/bin/python -v


     def broadcast_role_back_way(self, roles_back_way):
         registry = self
         if self.router.config.trace_router:
-  "BROAD BACK WAY ====> %r" % roles_back_way)
+                "BROADCAST BACK WAY ====> %r" % roles_back_way)
         # search in static routes
         static_routes = registry.static_routes
         for route_ref in static_routes:
         #   Broadcast forward the new role's back ways.
+        #
+        #   Somebody can be interested in know new clients
+        #
+        if case == 'NEW':
+            self.broadcast_event(
+                'EV_NEW_DYNAMIC_ROUTE',
+                gaplic_name=gaplic_name,
+                roles=roles,
+            )
     elif message_type == '__identity_card_ack__':
         'EV_INPUT_MESSAGE: bottom input',
         'EV_TIMEOUT: bottom input',
         'EV_SUBSCRIPTION: bottom input',
-        'EV_SEND_EVENT_OUTSIDE: top output',
+        'EV_SEND_EVENT_OUTSIDE: top input',
+        'EV_NEW_DYNAMIC_ROUTE: top output',
     'state_list': ('ST_IDLE',),
     'machine': {
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.