File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,11 @@ pub fn main() {
124
124
. index ( 2 )
125
125
. help ( "Prefix of files in \
126
126
database") ) )
127
- . subcommand ( SubCommand :: with_name ( "update-release-activity" ) ) )
127
+ . subcommand ( SubCommand :: with_name ( "update-release-activity" ) )
128
+ . about ( "Updates montly release activity \
129
+ chart")
130
+ . subcommand ( SubCommand :: with_name ( "update-search-index" ) )
131
+ . about ( "Updates search index" ) )
128
132
. get_matches ( ) ;
129
133
130
134
@@ -212,6 +216,9 @@ pub fn main() {
212
216
} else if let Some ( _) = matches. subcommand_matches ( "update-release-activity" ) {
213
217
// FIXME: This is actually util command not database
214
218
cratesfyi:: utils:: update_release_activity ( ) . expect ( "Failed to update release activity" ) ;
219
+ } else if let Some ( _) = matches. subcommand_matches ( "update-search-index" ) {
220
+ let conn = db:: connect_db ( ) . unwrap ( ) ;
221
+ db:: update_search_index ( & conn) . expect ( "Failed to update search index" ) ;
215
222
}
216
223
} else if let Some ( matches) = matches. subcommand_matches ( "start-web-server" ) {
217
224
start_web_server ( Some ( matches. value_of ( "SOCKET_ADDR" ) . unwrap_or ( "0.0.0.0:3000" ) ) ) ;
You can’t perform that action at this time.
0 commit comments