pub fn emit_progress<E: EventEmitter>(
channel: &E,
request_id: &str,
bytes_done: u64,
bytes_total: Option<u64>,
parts_done: u32,
parts_total: u32,
throttle: &mut ProgressThrottle,
now_ms: i64,
) -> Result<bool, AppError>Expand description
Emit a transfer:progress event if the throttle gate is open.
Updates throttle on emission. now_ms is the current wall-clock time
in milliseconds (callers obtain this via
std::time::SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis() as i64).
Returns Ok(true) when an event was emitted, Ok(false) when throttled.