Skip to content

Commit

Permalink
I give up on aws config (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
duogenesis authored Jan 18, 2025
1 parent db6cda0 commit adbab48
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 25 deletions.
2 changes: 1 addition & 1 deletion api.requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Flask-Limiter
Pillow
PyYAML
blurhash
boto3
boto3==1.35.99
confusable-homoglyphs
erlastic
flask-cors
Expand Down
2 changes: 1 addition & 1 deletion cron.requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pillow
blurhash
boto3
boto3==1.35.99
numpy
numpy==1.26.4
onnxruntime
Expand Down
5 changes: 0 additions & 5 deletions service/cron/checkphotos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
)
import asyncio
import boto3
from botocore.config import Config
import os
import random
import io
Expand Down Expand Up @@ -43,10 +42,6 @@
endpoint_url=BOTO_ENDPOINT_URL,
aws_access_key_id=R2_ACCESS_KEY_ID,
aws_secret_access_key=R2_ACCESS_KEY_SECRET,
config=Config(
request_checksum_calculation='WHEN_REQUIRED',
response_checksum_validation='WHEN_REQUIRED',
),
)

async def update_blurhashes(uuids: list[str]):
Expand Down
13 changes: 0 additions & 13 deletions service/cron/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from service.cron.util.sql import *
import asyncio
import boto3
from botocore.config import Config
import io
import os
import traceback
Expand Down Expand Up @@ -54,10 +53,6 @@ async def delete_images_from_object_store(
endpoint_url=BOTO_ENDPOINT_URL,
aws_access_key_id=R2_ACCESS_KEY_ID,
aws_secret_access_key=R2_ACCESS_KEY_SECRET,
config=Config(
request_checksum_calculation='WHEN_REQUIRED',
response_checksum_validation='WHEN_REQUIRED',
),
)

for chunk in chunks:
Expand Down Expand Up @@ -116,10 +111,6 @@ async def delete_audio_from_object_store(
endpoint_url=BOTO_ENDPOINT_URL,
aws_access_key_id=R2_ACCESS_KEY_ID,
aws_secret_access_key=R2_ACCESS_KEY_SECRET,
config=Config(
request_checksum_calculation='WHEN_REQUIRED',
response_checksum_validation='WHEN_REQUIRED',
),
)

for chunk in chunks:
Expand Down Expand Up @@ -172,10 +163,6 @@ async def download_450_images(
endpoint_url=BOTO_ENDPOINT_URL,
aws_access_key_id=R2_ACCESS_KEY_ID,
aws_secret_access_key=R2_ACCESS_KEY_SECRET,
config=Config(
request_checksum_calculation='WHEN_REQUIRED',
response_checksum_validation='WHEN_REQUIRED',
),
)

def download_one(uuid):
Expand Down
5 changes: 0 additions & 5 deletions service/person/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from PIL import Image
import io
import boto3
from botocore.config import Config
from concurrent.futures import ThreadPoolExecutor, as_completed
from service.person.sql import *
from service.search.sql import *
Expand Down Expand Up @@ -86,10 +85,6 @@ def parse_email_string(email_string):
endpoint_url=BOTO_ENDPOINT_URL,
aws_access_key_id=R2_ACCESS_KEY_ID,
aws_secret_access_key=R2_ACCESS_KEY_SECRET,
config=Config(
request_checksum_calculation='WHEN_REQUIRED',
response_checksum_validation='WHEN_REQUIRED',
),
)

bucket = s3.Bucket(R2_BUCKET_NAME)
Expand Down

0 comments on commit adbab48

Please sign in to comment.