chore: removed DOCKERIZED value and changed REDIS_SSL (#2813)

* chore: removed DOCKERIZED value

* chore: changed redis ssl
This commit is contained in:
Bavisetti Narayan 2023-11-20 21:32:00 +05:30 committed by sriram veeraghanta
parent 4416419c9b
commit 88ef24788e
4 changed files with 6 additions and 5 deletions

View File

@ -38,7 +38,8 @@ GPT_ENGINE="gpt-3.5-turbo" # deprecated
GITHUB_CLIENT_SECRET="" # For fetching release notes GITHUB_CLIENT_SECRET="" # For fetching release notes
# Settings related to Docker # Settings related to Docker
DOCKERIZED=1 DOCKERIZED=1 # deprecated
# set to 1 If using the pre-configured minio setup # set to 1 If using the pre-configured minio setup
USE_MINIO=1 USE_MINIO=1

View File

@ -71,7 +71,7 @@ def upload_to_s3(zip_file, workspace_id, token_id, slug):
file_name = f"{workspace_id}/export-{slug}-{token_id[:6]}-{timezone.now()}.zip" file_name = f"{workspace_id}/export-{slug}-{token_id[:6]}-{timezone.now()}.zip"
expires_in = 7 * 24 * 60 * 60 expires_in = 7 * 24 * 60 * 60
if settings.DOCKERIZED and settings.USE_MINIO: if settings.USE_MINIO:
s3 = boto3.client( s3 = boto3.client(
"s3", "s3",
endpoint_url=settings.AWS_S3_ENDPOINT_URL, endpoint_url=settings.AWS_S3_ENDPOINT_URL,

View File

@ -21,7 +21,7 @@ def delete_old_s3_link():
expired_exporter_history = ExporterHistory.objects.filter( expired_exporter_history = ExporterHistory.objects.filter(
Q(url__isnull=False) & Q(created_at__lte=timezone.now() - timedelta(days=8)) Q(url__isnull=False) & Q(created_at__lte=timezone.now() - timedelta(days=8))
).values_list("key", "id") ).values_list("key", "id")
if settings.DOCKERIZED and settings.USE_MINIO: if settings.USE_MINIO:
s3 = boto3.client( s3 = boto3.client(
"s3", "s3",
endpoint_url=settings.AWS_S3_ENDPOINT_URL, endpoint_url=settings.AWS_S3_ENDPOINT_URL,
@ -41,7 +41,7 @@ def delete_old_s3_link():
for file_name, exporter_id in expired_exporter_history: for file_name, exporter_id in expired_exporter_history:
# Delete object from S3 # Delete object from S3
if file_name: if file_name:
if settings.DOCKERIZED and settings.USE_MINIO: if settings.USE_MINIO:
s3.delete_object(Bucket=settings.AWS_S3_BUCKET_NAME, Key=file_name) s3.delete_object(Bucket=settings.AWS_S3_BUCKET_NAME, Key=file_name)
else: else:
s3.delete_object(Bucket=settings.AWS_S3_BUCKET_NAME, Key=file_name) s3.delete_object(Bucket=settings.AWS_S3_BUCKET_NAME, Key=file_name)

View File

@ -149,7 +149,7 @@ else:
# Redis Config # Redis Config
REDIS_URL = os.environ.get("REDIS_URL") REDIS_URL = os.environ.get("REDIS_URL")
REDIS_SSL = "rediss" in REDIS_URL REDIS_SSL = REDIS_URL and "rediss" in REDIS_URL
if REDIS_SSL: if REDIS_SSL:
CACHES = { CACHES = {