Function read_counter_from_metadata

Source
pub fn read_counter_from_metadata(
    metadata: &Option<HashMap<String, String>>,
    key: &str,
) -> u32
Expand description

Reads a counter value from job metadata.

§Arguments

  • metadata - Optional metadata HashMap from the job
  • key - The metadata key to read

§Returns

The counter value as u32, or 0 if not present or invalid.