File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ use libc::fork;
13
13
use time;
14
14
use DocBuilderOptions ;
15
15
use DocBuilder ;
16
+ use utils:: { update_sources, update_release_activity} ;
16
17
17
18
18
19
const DAEMON_PID_FILE_PATH : & ' static str = "/var/run/cratesfyi.pid" ;
@@ -66,6 +67,13 @@ pub fn start_daemon() {
66
67
// check lock file
67
68
if opts. prefix . join ( "cratesfyi.lock" ) . exists ( ) {
68
69
warn ! ( "Lock file exits, skipping building new crates" ) ;
70
+ continue ;
71
+ }
72
+
73
+ // update index
74
+ if let Err ( e) = update_sources ( ) {
75
+ error ! ( "Failed to update sources: {}" , e) ;
76
+ continue ;
69
77
}
70
78
71
79
let mut doc_builder = DocBuilder :: new ( opts) ;
@@ -93,7 +101,7 @@ pub fn start_daemon() {
93
101
let now = time:: now ( ) ;
94
102
if now. tm_hour == 2 && now. tm_min == 0 {
95
103
info ! ( "Updating release activity" ) ;
96
- if let Err ( e) = :: utils :: update_release_activity ( ) {
104
+ if let Err ( e) = update_release_activity ( ) {
97
105
error ! ( "Failed to update release activity: {}" , e) ;
98
106
}
99
107
}
You can’t perform that action at this time.
0 commit comments