Skip to content

Commit

Permalink
* Add sdlog import in sddb.
Browse files Browse the repository at this point in the history
* Add comments.
  • Loading branch information
jerome authored and jerome committed Jun 8, 2015
1 parent f1497f2 commit 53a4120
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sdt/bin/sddaemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
If we do import it and it's loaded before the double-fork, then the who_am_i()
func doesn't work anymore. My understanding is that a double-fork is not like
an exec, i.e. loaded module before the double fork are reused after the double fork.
I think that because it's seems that sdapp module init code doesn't get executed
I think that, because it's seems that sdapp module init code doesn't get executed
twice (TO BE CONFIRMED).
"""

Expand Down
1 change: 1 addition & 0 deletions sdt/bin/sddb.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import sqlite3
import atexit
import sdapp
import sdlog
import sdconfig
import sddbobj
import sddbversion
Expand Down
9 changes: 7 additions & 2 deletions sdt/bin/sddbversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@
"""This module contains database versioning routines."""

import sdapp
import sdlog
import sddbversionutils
from sdexception import SDException
import sdlog

def check_version(conn):
"""Upgrade the database schema if database version does not match binary version."""
"""Upgrade the database schema if database version does not match binary version.
Note
This func must be light as executed each time 'synda' starts
(except for special case like 'synda -V').
"""

current_db_version=sddbversionutils.get_db_version(conn)

Expand Down

0 comments on commit 53a4120

Please sign in to comment.