mirror of
https://github.com/Xevion/postgres-test.git
synced 2025-12-06 09:15:52 -06:00
Setup main.py logging, seed.main call, add util.py
This commit is contained in:
9
main.py
9
main.py
@@ -1,8 +1,15 @@
|
||||
from psycopg2 import connect
|
||||
from src.seed import main
|
||||
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logging.basicConfig(level=logging.ERROR)
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
if __name__ == '__main__':
|
||||
conn = connect(dbname='railway', user='postgres', password='8h9hxh5YeBwfqTCrxQQb',
|
||||
host='containers-us-west-174.railway.app', port='7238')
|
||||
logger.info('Connected to database.')
|
||||
|
||||
main(conn)
|
||||
main(conn, 250, 1000, 500)
|
||||
|
||||
Reference in New Issue
Block a user