forked from phoenix/litellm-mirror
skip prisma gen step
This commit is contained in:
parent
2c0f4c9865
commit
ab7758840b
1 changed files with 11 additions and 11 deletions
|
@ -844,17 +844,17 @@ class PrismaClient:
|
||||||
dname = os.path.dirname(abspath)
|
dname = os.path.dirname(abspath)
|
||||||
os.chdir(dname)
|
os.chdir(dname)
|
||||||
|
|
||||||
try:
|
# try:
|
||||||
subprocess.run(["prisma", "generate"])
|
# subprocess.run(["prisma", "generate"])
|
||||||
subprocess.run(
|
# subprocess.run(
|
||||||
["prisma", "db", "push", "--accept-data-loss"]
|
# ["prisma", "db", "push", "--accept-data-loss"]
|
||||||
) # this looks like a weird edge case when prisma just wont start on render. we need to have the --accept-data-loss
|
# ) # this looks like a weird edge case when prisma just wont start on render. we need to have the --accept-data-loss
|
||||||
except Exception as e:
|
# except Exception as e:
|
||||||
raise Exception(
|
# raise Exception(
|
||||||
f"Unable to run prisma commands. Run `pip install prisma` Got Exception: {(str(e))}"
|
# f"Unable to run prisma commands. Run `pip install prisma` Got Exception: {(str(e))}"
|
||||||
)
|
# )
|
||||||
finally:
|
# finally:
|
||||||
os.chdir(original_dir)
|
# os.chdir(original_dir)
|
||||||
# Now you can import the Prisma Client
|
# Now you can import the Prisma Client
|
||||||
from prisma import Prisma # type: ignore
|
from prisma import Prisma # type: ignore
|
||||||
verbose_proxy_logger.debug("Connecting Prisma Client to DB..")
|
verbose_proxy_logger.debug("Connecting Prisma Client to DB..")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue