mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-12 18:18:08 +00:00
Fix condition for triggering new unique report event (#422)
This commit is contained in:
@ -69,10 +69,11 @@ async fn upload_deduped(report: &CrashReport, container: &BlobContainerUrl) -> R
|
|||||||
.put(deduped_url)
|
.put(deduped_url)
|
||||||
.json(report)
|
.json(report)
|
||||||
// Conditional PUT, only if-not-exists.
|
// Conditional PUT, only if-not-exists.
|
||||||
|
// https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-conditional-headers-for-blob-service-operations
|
||||||
.header("If-None-Match", "*")
|
.header("If-None-Match", "*")
|
||||||
.send_retry_default()
|
.send_retry_default()
|
||||||
.await?;
|
.await?;
|
||||||
if result.status() != StatusCode::NOT_MODIFIED {
|
if result.status() == StatusCode::CREATED {
|
||||||
event!(new_unique_report;);
|
event!(new_unique_report;);
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Reference in New Issue
Block a user