File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,15 @@ async fn create_benchmark_request_master_commits(
26
26
conn : & dyn database:: pool:: Connection ,
27
27
index : & BenchmarkRequestIndex ,
28
28
) -> anyhow:: Result < ( ) > {
29
- let master_commits = & ctxt. get_master_commits ( ) . commits ;
29
+ let now = Utc :: now ( ) ;
30
+
31
+ let master_commits = ctxt. get_master_commits ( ) ;
32
+ // Only consider the last ~month of master commits
33
+ let master_commits = master_commits
34
+ . commits
35
+ . iter ( )
36
+ . filter ( |c| now. signed_duration_since ( c. time ) < chrono:: Duration :: days ( 29 ) ) ;
37
+
30
38
// TODO; delete at some point in the future
31
39
let cutoff: chrono:: DateTime < Utc > = chrono:: DateTime :: from_str ( "2025-08-27T00:00:00.000Z" ) ?;
32
40
@@ -62,12 +70,11 @@ async fn create_benchmark_request_releases(
62
70
// TODO; delete at some point in the future
63
71
let cutoff: chrono:: DateTime < Utc > = chrono:: DateTime :: from_str ( "2025-08-27T00:00:00.000Z" ) ?;
64
72
65
- let releases: Vec < _ > = releases
73
+ let releases = releases
66
74
. lines ( )
67
75
. rev ( )
68
76
. filter_map ( parse_release_string)
69
- . take ( 20 )
70
- . collect ( ) ;
77
+ . take ( 20 ) ;
71
78
72
79
for ( name, commit_date) in releases {
73
80
if commit_date >= cutoff && !index. contains_tag ( & name) {
You can’t perform that action at this time.
0 commit comments