Skip to content

Commit d8479d0

Browse files
committed
Add manage and settings
1 parent d89d2b9 commit d8479d0

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

src/python/reddit/manage.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from grongier.pex import Director,Utils
2+
3+
Utils.migrate()
4+
5+
Director.start_production("dc.Python.Production")

src/python/reddit/settings.py

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import bp
2+
from bo import *
3+
from bs import *
4+
5+
CLASSES = {
6+
'Python.RedditService': RedditService,
7+
'Python.FilterPostRoutingRule': bp.FilterPostRoutingRule,
8+
'Python.FileOperation': FileOperation,
9+
'Python.FileOperationWithIrisAdapter': FileOperationWithIrisAdapter,
10+
}
11+
12+
PRODUCTIONS = [
13+
{
14+
'dc.Python.Production': {
15+
"@Name": "dc.Demo.Production",
16+
"@TestingEnabled": "true",
17+
"@LogGeneralTraceEvents": "false",
18+
"Description": "",
19+
"ActorPoolSize": "2",
20+
"Item": [
21+
{
22+
"@Name": "Python.FileOperation",
23+
"@Category": "",
24+
"@ClassName": "Python.FileOperation",
25+
"@PoolSize": "1",
26+
"@Enabled": "true",
27+
"@Foreground": "false",
28+
"@Comment": "",
29+
"@LogTraceEvents": "true",
30+
"@Schedule": "",
31+
"Setting": {
32+
"@Target": "Host",
33+
"@Name": "%settings",
34+
"#text": "path=/tmp"
35+
}
36+
},
37+
{
38+
"@Name": "Python.RedditService",
39+
"@Category": "",
40+
"@ClassName": "Python.RedditService",
41+
"@PoolSize": "1",
42+
"@Enabled": "true",
43+
"@Foreground": "false",
44+
"@Comment": "",
45+
"@LogTraceEvents": "false",
46+
"@Schedule": "",
47+
"Setting": [
48+
{
49+
"@Target": "Host",
50+
"@Name": "%settings",
51+
"#text": "limit=10\nother<10"
52+
}
53+
]
54+
},
55+
{
56+
"@Name": "Python.FilterPostRoutingRule",
57+
"@Category": "",
58+
"@ClassName": "Python.FilterPostRoutingRule",
59+
"@PoolSize": "1",
60+
"@Enabled": "true",
61+
"@Foreground": "false",
62+
"@Comment": "",
63+
"@LogTraceEvents": "false",
64+
"@Schedule": ""
65+
}
66+
]
67+
}
68+
}
69+
]

0 commit comments

Comments
 (0)