File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 6
6
load_dotenv ()
7
7
except :
8
8
pass
9
- IS_LOCAL = os .getenv ("USER" ) == os .environ .get ("USER_LOCAL" )
9
+ IS_LOCAL = os .getenv ("USER" , '1' ) == os .environ .get ("USER_LOCAL" )
10
10
11
11
12
12
DATABASE_URL_LOCAL = "postgresql+asyncpg://admin:admin@0.0.0.0:5434/postgres"
18
18
# flyctl proxy 5432 -a full-stack-db
19
19
if IS_LOCAL :
20
20
DATABASE_URL = DATABASE_URL
21
- # DATABASE_URL = "postgresql+asyncpg://postgres:e0CEeFYUY7kERQcW@aws-0-us-east-1.pooler.supabase.com:6543/postgres"
21
+ DATABASE_URL = "postgresql+asyncpg://postgres:e0CEeFYUY7kERQcW@aws-0-us-east-1.pooler.supabase.com:6543/postgres"
22
22
# DATABASE_URL = DATABASE_URL_PROD
23
23
24
24
class Settings :
Original file line number Diff line number Diff line change 12
12
async def create_fake_data ():
13
13
fake = Faker ()
14
14
15
- engine = create_async_engine (conf .POSTGRES_DATABASE_URL , connect_args = {
16
- "ssl" : "require" ,
17
- # optional: if still using pooler
18
- "statement_cache_size" : 0
19
- },
20
- echo = True
21
- )
15
+ engine = create_async_engine (conf .POSTGRES_DATABASE_URL , echo = False )
22
16
DBModel .engine = engine
23
17
24
18
async with engine .begin () as conn :
You can’t perform that action at this time.
0 commit comments