ci-fix
Some checks failed
deploy / deploy (push) Failing after 6s

This commit is contained in:
Untone 2024-09-23 14:01:20 +03:00
parent 3ff90ba4f3
commit 22fd211c7c
2 changed files with 11 additions and 1 deletions

View File

@ -24,3 +24,10 @@ jobs:
branch: 'main'
git_remote_url: 'ssh://dokku@v2.discours.io:22/quoter'
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Push to dokku
uses: dokku/github-action@master
with:
branch: 'dev'
git_remote_url: 'ssh://dokku@staging.discours.io:22/quoter'
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}

View File

@ -5,7 +5,9 @@ use crate::auth::{get_id_by_token, user_added_file};
use crate::s3_utils::{
check_file_exists, generate_key_with_extension, load_file_from_s3, upload_to_s3,
};
use crate::thumbnail::{find_closest_width, generate_thumbnails, parse_thumbnail_request, ALLOWED_THUMBNAIL_WIDTHS};
use crate::thumbnail::{
find_closest_width, generate_thumbnails, parse_thumbnail_request, ALLOWED_THUMBNAIL_WIDTHS,
};
use actix_multipart::Multipart;
use actix_web::error::ErrorInternalServerError;
use actix_web::{web, HttpRequest, HttpResponse, Result};
@ -158,6 +160,7 @@ pub async fn proxy_handler(
let thumbnails_bytes =
generate_thumbnails(&image, &ALLOWED_THUMBNAIL_WIDTHS).await?;
let thumbnail_bytes = thumbnails_bytes[&closest_width].clone();
// Загружаем миниатюру в S3
upload_to_s3(
&state.s3_client,