mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-22 14:19:03 +00:00
bubble out invalid messages on input queues (#731)
This commit is contained in:
@ -150,16 +150,9 @@ async fn poll_inputs(
|
|||||||
loop {
|
loop {
|
||||||
heartbeat.alive();
|
heartbeat.alive();
|
||||||
if let Some(message) = input_queue.pop().await? {
|
if let Some(message) = input_queue.pop().await? {
|
||||||
let input_url = message.parse(|data| BlobUrl::parse(str::from_utf8(data)?));
|
let input_url = message
|
||||||
|
.parse(|data| BlobUrl::parse(str::from_utf8(data)?))
|
||||||
let input_url = match input_url {
|
.with_context(|| format!("unable to parse URL from queue: {:?}", message))?;
|
||||||
Ok(url) => url,
|
|
||||||
Err(err) => {
|
|
||||||
error!("could not parse input URL from queue message: {}", err);
|
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if !already_checked(&config, &input_url).await? {
|
if !already_checked(&config, &input_url).await? {
|
||||||
let destination_path = _copy(input_url, &tmp_dir).await?;
|
let destination_path = _copy(input_url, &tmp_dir).await?;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user