DEV Community

Kostja Appliku.com
Kostja Appliku.com

Posted on

4 2

Stop deployment

I am working on Appliku, which is building, and deployment automation SaaS.

Read the story: https://dev.to/kostjapalovic/tired-of-deployments-built-my-own-heroku-47ed.

It is built with Django and heavily uses Celery.

One of the most important parts that I want to improve is the build/deployment process. More specifically being able to manage running build/deploy jobs.

What problems I see right now:

  • Deployments run as long as they want
  • There is no way to stop/cancel the deployment
  • If the app has a push-to-deploy setting On then several deployments will be running at the same time and this can exhaust the server's resources and lead to errors due to concurrent deployments
  • I want to disable the "Deploy Now" button while there are deployments in the queue
  • by the way, I want deployments to be in the queue with only one running
  • If a deployment is stuck or taking a significant amount of time to complete this will effectively block the user from deploying the next version of the code which might have fixes for the underlying problem.

With all said, it boils done one thing right now: I need a way to stop a deployment job.

How Appliku runs the build/deployment process?

There is a Celery task, that connects to the server using the Paramiko library.

The actual code of the function is this:

What I want to do is to somehow pass the signal from the dashboard to stop this. The function will have to kill the command running and close the connection, mark the deployment as canceled.
Also, it must have timeouts in case if any of the stages are stuck for any reason.

I use Redis cache to store the abort flag for deployment.

Now I only need to add the "Abort Deployment" button in the interface of https://appliku.com/

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more