Skip to content

Commit

Permalink
Remove hash check
Browse files Browse the repository at this point in the history
  • Loading branch information
bsmartradio committed Jan 31, 2025
1 parent 8127698 commit a757a6b
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions alertingest/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,9 @@

import abc
import gzip
import hashlib
import logging
from typing import Any, Set


def calculate_sha256(content):
sha256_hash = hashlib.sha256()
sha256_hash.update(content)
return sha256_hash.hexdigest()


import boto3
from botocore.config import Config

Expand Down Expand Up @@ -137,10 +129,6 @@ def store_alert(
def store_schema(self, schema_id: int, encoded_schema: bytes):
schema_key = f"/alert_archive/v1/schemas/{schema_id}.json"

data = encoded_schema # this is the data you're trying to upload
calculated_hash = calculate_sha256(data)
print(f"Calculated SHA-256 hash: {calculated_hash}")

try:
self.object_store_client.put_object(
Bucket=self.schema_bucket, Key=schema_key, Body=encoded_schema
Expand Down

0 comments on commit a757a6b

Please sign in to comment.