generated from mlibrary/python-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add explicit path to load_statuses.py
- Loading branch information
Showing
1 changed file
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
from aim.digifeeds.database.models import load_statuses | ||
from aim.digifeeds.database.main import SessionLocal | ||
import sys | ||
|
||
sys.path = ["", "../../"] + sys.path[1:] | ||
from aim.digifeeds.database.models import load_statuses # noqa: E402 | ||
from aim.digifeeds.database.main import SessionLocal # noqa: E402 | ||
|
||
|
||
def main(): | ||
with SessionLocal() as db_session: | ||
load_statuses(session=db_session) | ||
load_statuses(session=db_session) | ||
|
||
|
||
if __name__=='__main__': | ||
sys.exit(main()) | ||
if __name__ == "__main__": | ||
sys.exit(main()) |