File tree 4 files changed +15
-4
lines changed
4 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 6
6
> previously functions and constants are all over the place that it's starting
7
7
> to get harder to find what I'm looking for.
8
8
9
+ ## 3.6.1 (Project Structure Refactor - Part 1.5 A.K.A Hotfix)
10
+
11
+ - [ ** Fixed** ] Fixed issues related to ` import tse `
12
+ - [ ** Fixed** ] Aerich caused the bot to crash in production environment
13
+
9
14
## 3.6.0 (Project Structure Refactor - Part 1)
10
15
11
16
### Bugfixes
Original file line number Diff line number Diff line change 10
10
except ImportError :
11
11
dbUrl = os .environ ["ZIBOT_DB_URL" ]
12
12
13
- cfg = Config ("" , dbUrl )
13
+ cfg = Config ("" , dbUrl , useAerich = True )
14
14
t = cfg .tortoiseConfig
Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " Z3R0"
3
- version = " 3.6.0 "
3
+ version = " 3.6.1 "
4
4
description = " A multi-purpose open source discord bot"
5
5
authors = [" null2264" ]
6
6
license = " MPL-2.0"
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ class Config:
25
25
"internalApiHost" ,
26
26
"test" ,
27
27
"zmqPorts" ,
28
+ "useAerich" ,
28
29
)
29
30
30
31
def __init__ (
@@ -41,6 +42,7 @@ def __init__(
41
42
internalApiHost : str | None = None ,
42
43
test : bool = False ,
43
44
zmqPorts : dict [str , int ] | None = None ,
45
+ useAerich : bool = False ,
44
46
):
45
47
self .token = token
46
48
self .defaultPrefix = defaultPrefix or ">"
@@ -54,19 +56,23 @@ def __init__(
54
56
self .internalApiHost = internalApiHost or "127.0.0.1:2264"
55
57
self .test = test
56
58
self .zmqPorts = zmqPorts or {}
59
+ self .useAerich = useAerich
57
60
58
61
@property
59
62
def tortoiseConfig (self ):
60
63
mainModel = "main.core.db"
61
64
if not self .test :
62
65
mainModel = "src." + mainModel
63
66
67
+ models = [mainModel ]
68
+ if self .useAerich :
69
+ models .append ("aerich.models" )
70
+
64
71
return self ._tortoiseConfig or {
65
72
"connections" : {"default" : self .databaseUrl },
66
73
"apps" : {
67
74
"models" : {
68
- # "models": [mainModel, "aerich.models"],
69
- "models" : [mainModel ],
75
+ "models" : models ,
70
76
"default_connection" : "default" ,
71
77
},
72
78
},
You can’t perform that action at this time.
0 commit comments