1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
use crateSignature;
use Value;
/// Creates a signature for collecting results from multiple tasks
///
/// Useful for aggregating results in map-reduce patterns.
///
/// # Arguments
///
/// * `collector_task` - Name of the task that collects results
/// * `expected_count` - Expected number of results to collect
///
/// # Example
///
/// ```rust,ignore
/// use celers::result_helpers::create_result_collector;
///
/// let collector = create_result_collector("aggregate_results", 100);
/// ```
/// Creates a task that filters results based on criteria
///
/// # Arguments
///
/// * `filter_task` - Name of the filtering task
/// * `criteria` - Filtering criteria as JSON value
///
/// # Example
///
/// ```rust,ignore
/// use celers::result_helpers::create_result_filter;
/// use serde_json::json;
///
/// let filter = create_result_filter(
/// "filter_successful",
/// json!({"status": "success"})
/// );
/// ```
/// Creates a task for transforming result data
///
/// # Arguments
///
/// * `transform_task` - Name of the transformation task
/// * `transformation_config` - Configuration for the transformation
///
/// # Example
///
/// ```rust,ignore
/// use celers::result_helpers::create_result_transformer;
/// use serde_json::json;
///
/// let transformer = create_result_transformer(
/// "format_results",
/// json!({"format": "csv", "include_headers": true})
/// );
/// ```
/// Creates a task for reducing/aggregating multiple results
///
/// # Arguments
///
/// * `reduce_task` - Name of the reduce task
/// * `operation` - Type of reduction operation (e.g., "sum", "average", "concat")
///
/// # Example
///
/// ```rust,ignore
/// use celers::result_helpers::create_result_reducer;
///
/// let reducer = create_result_reducer("sum_results", "sum");
/// ```