Skip to content

Commit d3cfdc5

Browse files
committed
chore: remove example
1 parent 4ac0d7c commit d3cfdc5

1 file changed

Lines changed: 0 additions & 27 deletions

File tree

nebula/controller/database.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -632,30 +632,3 @@ async def remove_note(scenario):
632632
"""
633633
async with POOL.acquire() as conn:
634634
await conn.execute("DELETE FROM notes WHERE scenario = $1;", scenario)
635-
636-
637-
if __name__ == "__main__":
638-
# This is an example of how to use the new pool-based functions.
639-
# In a real application, init_db_pool() would be called at startup,
640-
# and close_db_pool() at shutdown.
641-
642-
async def main():
643-
# Set environment variables for local testing if not already set
644-
os.environ.setdefault('DB_USER', 'your_user')
645-
os.environ.setdefault('DB_PASSWORD', 'your_password')
646-
os.environ.setdefault('DB_HOST', 'localhost')
647-
os.environ.setdefault('DB_PORT', '5432')
648-
649-
logging.basicConfig(level=logging.INFO)
650-
651-
await init_db_pool()
652-
try:
653-
# Example: list all users
654-
users = await list_users()
655-
logging.info(f"Found users: {users}")
656-
finally:
657-
await close_db_pool()
658-
659-
# To run this example:
660-
# asyncio.run(main())
661-
pass

0 commit comments

Comments
 (0)