fix init
This commit is contained in:
parent
6211253675
commit
fa22ee34de
1 changed files with 2 additions and 1 deletions
|
@ -8,7 +8,7 @@ import json
|
|||
import sqlalchemy as sa
|
||||
from sqlalchemy.sql.expression import text
|
||||
|
||||
from utils import datetime2ts, ts2datetime
|
||||
from utils import datetime2ts, ts2datetime, make_folder
|
||||
from websocket import trigger_event
|
||||
import db
|
||||
import settings
|
||||
|
@ -46,6 +46,7 @@ def add_record(action, *args, **kwargs):
|
|||
else:
|
||||
mode = 'w'
|
||||
state.changelog_size = 0
|
||||
make_folder(path)
|
||||
with open(path, mode) as fd:
|
||||
fd.write(data + '\n')
|
||||
state.changelog_size = os.path.getsize(path)
|
||||
|
|
Loading…
Reference in a new issue