rage / tmc-langs-rust

A library and CLI for supporting different programming languages in the TestMyCode programming assignment evaluator.
https://tmc.mooc.fi/
Apache License 2.0
8 stars 9 forks source link

Progress_reporter progress gets stuck at 1.0 for distinct consecutive calls #147

Closed noobLue closed 3 years ago

noobLue commented 3 years ago

Example: Calling TmcClient::wait_for_submission after TmcClient::Submit

let callback = |status: tmc_langs_util::progress_reporter::StatusUpdate<ClientUpdateData>| {
    println!("Progress: {} message: {}", status.percent_done, status.message);
};
tmc_langs_util::progress_reporter::subscribe(callback);

let submission = client.submit(return_url, exercise_path, None).unwrap();
println!("\nProgress stuck at 1.0:\n");
let result = client.wait_for_submission(&submission.submission_url);

Output:

 Progress: 0 message: Compressing submission...
 Progress: 0.5 message: Compressed submission. Posting submission...
 Progress: 1 message: Submission finished, running at https://tmc.mooc.fi/submissions/xxxxxxxx

Progress stuck at 1.0:

 Progress: 1 message: Waiting for submission
 Progress: 1 message: Sending to sandbox
 Progress: 1 message: Processing on sandbox
 Progress: 1 message: Submission finished processing!