Skip to content

Commit

Permalink
Cache stats in Redis while jobs are running (#206)
Browse files Browse the repository at this point in the history
* BITMAKER-1980: Save real-time stats in Redis (#144)

* Retrieve job stats from Redis if the job is running
* Catch Exception rather than PyMongo exceptions
* Add unless-stopped restart policy to docker services
* Save stats from Redis when job is manually stopped
  • Loading branch information
mgonnav authored and webtaken committed Jul 17, 2023
1 parent 5bf0068 commit 1262db4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion estela-api/api/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from rest_framework.pagination import PageNumberPagination
from rest_framework.permissions import IsAuthenticated

from api.permissions import IsProjectUser, IsAdminOrReadOnly
from api.permissions import IsAdminOrReadOnly, IsProjectUser
from core.models import Notification, Activity


Expand Down
2 changes: 2 additions & 0 deletions estela-api/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from api.tokens import account_reset_token
from config.job_manager import job_manager

from api.tokens import account_reset_token
from config.job_manager import job_manager

def launch_deploy_job(pid, did, container_image):
deploy_user = User.objects.get(username="deploy_manager")
Expand Down

0 comments on commit 1262db4

Please sign in to comment.