(ident, init_type="listen")
| 36 | |
| 37 | |
| 38 | def init_snakemq(ident, init_type="listen"): |
| 39 | link = snakemq.link.Link() |
| 40 | packeter = snakemq.packeter.Packeter(link) |
| 41 | messaging = snakemq.messaging.Messaging(ident, "", packeter) |
| 42 | if init_type == "listen": |
| 43 | link.add_listener((f"{slip}", config.SNAKEMQ_PORT)) |
| 44 | elif init_type == "connect": |
| 45 | link.add_connector((f"{scip}", config.SNAKEMQ_PORT)) |
| 46 | else: |
| 47 | raise Exception("Unsupported init type.") |
| 48 | return messaging, link |
| 49 | |
| 50 | |
| 51 | def response_format(code=0, msg="success", data={}, success=True, failed=False): |
nothing calls this directly
no outgoing calls
no test coverage detected