Skip to content

Commit b787fb7

Browse files
committed
Add asynchronous request for MyBP and define production settings in settings.py
1 parent 60272c4 commit b787fb7

File tree

2 files changed

+72
-1
lines changed

2 files changed

+72
-1
lines changed

demo/python/async/bp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def on_message(self, request):
1010

1111
self.send_request_async("Python.MyBO", msg_one,completion_key="1")
1212
self.send_request_async("Python.MyBO", msg_two,completion_key="2")
13+
self.send_request_async("Python.MyBO", msg_two,completion_key="3", response_required=False)
1314

1415
def on_response(self, request, response, call_request, call_response, completion_key):
1516
if completion_key == "1":

demo/python/async/settings.py

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,74 @@
44
CLASSES = {
55
"Python.MyBO": MyBO,
66
"Python.MyBP": MyBP,
7-
}
7+
}
8+
9+
PRODUCTIONS = [
10+
{
11+
"DemoAync.Production": {
12+
"@Name": "DemoAync.Production",
13+
"@TestingEnabled": "true",
14+
"@LogGeneralTraceEvents": "false",
15+
"Description": "",
16+
"ActorPoolSize": "2",
17+
"Item": [
18+
{
19+
"@Name": "UnitTest.MyOperation",
20+
"@Category": "",
21+
"@ClassName": "UnitTest.MyOperation",
22+
"@PoolSize": "1",
23+
"@Enabled": "true",
24+
"@Foreground": "false",
25+
"@Comment": "",
26+
"@LogTraceEvents": "false",
27+
"@Schedule": ""
28+
},
29+
{
30+
"@Name": "Python.Demo.MyBusinessOperation",
31+
"@Category": "",
32+
"@ClassName": "Python.Demo.MyBusinessOperation",
33+
"@PoolSize": "1",
34+
"@Enabled": "false",
35+
"@Foreground": "false",
36+
"@Comment": "",
37+
"@LogTraceEvents": "false",
38+
"@Schedule": ""
39+
},
40+
{
41+
"@Name": "Python.MyBP",
42+
"@Category": "",
43+
"@ClassName": "Python.MyBP",
44+
"@PoolSize": "1",
45+
"@Enabled": "true",
46+
"@Foreground": "false",
47+
"@Comment": "",
48+
"@LogTraceEvents": "false",
49+
"@Schedule": "",
50+
"Setting": [
51+
{
52+
"@Target": "Host",
53+
"@Name": "%enable",
54+
"#text": "0"
55+
},
56+
{
57+
"@Target": "Host",
58+
"@Name": "%port",
59+
"#text": "54132"
60+
}
61+
]
62+
},
63+
{
64+
"@Name": "Python.MyBO",
65+
"@Category": "",
66+
"@ClassName": "Python.MyBO",
67+
"@PoolSize": "1",
68+
"@Enabled": "true",
69+
"@Foreground": "false",
70+
"@Comment": "",
71+
"@LogTraceEvents": "false",
72+
"@Schedule": ""
73+
}
74+
]
75+
}
76+
}
77+
]

0 commit comments

Comments
 (0)