Assistance Redeployment Trigger after Python Function Execution

Hello. I’m currently working on a project hosted on Replit, utilizing a Reserved VM with cycles. I have a specific inquiry regarding the Deployment action and would greatly appreciate some guidance.

My scenario involves the implementation of a webhook that receives data from a form, subsequently triggering a Python function responsible for file creation.

While I have successfully implemented the initial setup, I’m now faced with the challenge of triggering a “Redeploy” after the Python function execution, so that production app reads the new files created. Or maybe I can fix it using the DataBase?

Could someone please provide insights or examples on how to effectively achieve this? Your assistance is highly valued.

Thank you in advance.
Repl link/Link to where the bug appears:

Screenshots, links, or other helpful context:

code snippet
1 Like

@NateDhaliwal yo some one needs your help

1 Like

Hi @arrietaeliara !
Does redeploying not take in the updated code? It should since the changes were saved.

1 Like

Hello thanks for reply.

Yes it does, that works fine, but I need to re-deploy after the code gets updated.
A webhook endpoint listens to incoming data, and then some files get created.
I need to redeploy after files are created, I do not know if I can call some function to redeploy the replit to production.

Unfortunately you can’t do this, as Deployments don’t support persistent file systems, so files won’t write or be created.
Hope this helps!