addung health endpoint
This commit is contained in:
parent
1e24f0cee2
commit
4f9a670aa7
@ -10,12 +10,16 @@ import boto3
|
||||
from flask_jwt_extended import JWTManager, jwt_required, create_access_token, get_jwt_identity
|
||||
|
||||
app = Flask(__name__)
|
||||
app.config['MAX_CONTENT_LENGTH'] = 100 * 1024 * 1024 # 16 MB limit
|
||||
app.config['MAX_CONTENT_LENGTH'] = 100 * 1024 * 1024 # 100 MB limit
|
||||
|
||||
# AWS S3 Configuration
|
||||
s3 = boto3.client('s3')
|
||||
BUCKET_NAME = 'songsbucketparth'
|
||||
|
||||
@app.route('/health', methods=['GET'])
|
||||
def health_check():
|
||||
return jsonify({"status": "ok"}), 200
|
||||
|
||||
@app.route('/process_and_upload', methods=['POST'])
|
||||
def upload_to_s3(processed_data, userId):
|
||||
# Create an in-memory bytes buffer
|
||||
@ -60,7 +64,6 @@ def process_audio_bytes(audio_bytes, index):
|
||||
|
||||
pa = ProceesAudio()
|
||||
|
||||
|
||||
processed_data = pa.perform_modulation(data=data, sr=sample_rate, index=index)
|
||||
file_url = upload_to_s3(processed_data=processed_data, userId="parth")
|
||||
arr_to_show = []
|
||||
|
Loading…
Reference in New Issue
Block a user