test_smartreceive_function #1

Merged
ton merged 15 commits from test_smartreceive_function into main 2026-02-12 23:34:18 +00:00
3 changed files with 6 additions and 6 deletions
Showing only changes of commit 615c537552 - Show all commits

BIN
new_testFile_large.zip Normal file

Binary file not shown.

View File

@@ -104,7 +104,7 @@ function log_trace(correlation_id::String, message::String)
timestamp = Dates.now() # Get current timestamp timestamp = Dates.now() # Get current timestamp
@info "[$timestamp] [Correlation: $correlation_id] $message" # Log formatted message @info "[$timestamp] [Correlation: $correlation_id] $message" # Log formatted message
end end
2112
""" smartsend - Send data either directly via NATS or via a fileserver URL, depending on payload size """ smartsend - Send data either directly via NATS or via a fileserver URL, depending on payload size
@@ -364,12 +364,12 @@ function smartreceive(
log_trace(env.correlation_id, "Link transport - fetching from URL") # Log link transport handling log_trace(env.correlation_id, "Link transport - fetching from URL") # Log link transport handling
# Fetch with exponential backoff # Fetch with exponential backoff
data = _fetch_with_backoff(env.url, max_retries, base_delay, max_delay, env.correlation_id) # Fetch data from URL downloaded_data = _fetch_with_backoff(env.url, max_retries, base_delay, max_delay, env.correlation_id) # Fetch data from URL
# Deserialize based on type # Deserialize based on type
result = _deserialize_data(data, env.type, env.correlation_id, env.metadata) # Convert bytes to Julia data data = _deserialize_data(downloaded_data, env.type, env.correlation_id, env.metadata) # Convert bytes to Julia data
return (data = result, envelope = env) # Return data and envelope as tuple return (data = data, envelope = env) # Return data and envelope as tuple
else # Unknown transport type else # Unknown transport type
error("Unknown transport type: $(env.transport)") # Throw error for unknown transport error("Unknown transport type: $(env.transport)") # Throw error for unknown transport
end end

View File

@@ -104,7 +104,7 @@ function test_large_binary_receive()
end end
# Keep listening for 10 seconds # Keep listening for 10 seconds
sleep(60) sleep(120)
NATS.drain(conn) NATS.drain(conn)
end end