test gcs logging payload

This commit is contained in:
Ishaan Jaff 2024-08-12 16:07:08 -07:00 committed by Krrish Dholakia
parent 5569e8790a
commit de9bd4abe6

View File

@ -117,17 +117,8 @@ async def test_basic_gcs_logger():
await asyncio.sleep(5)
# Get the current date
# Get the current date
current_date = datetime.now().strftime("%Y-%m-%d")
# Modify the object_name to include the date-based folder
object_name = f"{current_date}%2F{response.id}"
print("object_name", object_name)
# Check if object landed on GCS
object_from_gcs = await gcs_logger.download_gcs_object(object_name=object_name)
object_from_gcs = await gcs_logger.download_gcs_object(object_name=response.id)
print("object from gcs=", object_from_gcs)
# convert object_from_gcs from bytes to DICT
parsed_data = json.loads(object_from_gcs)