File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed
Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,11 @@ use tokio::sync::mpsc::UnboundedSender;
66use crate :: query_engine:: QueryEngine ;
77use crate :: { error, info, Result } ;
88
9- pub async fn query_database ( tx : UnboundedSender < Bot > , parsed_sql_file : impl AsRef < str > , limit_total_runnable : usize ) {
9+ pub async fn query_database (
10+ tx : UnboundedSender < Bot > ,
11+ parsed_sql_file : impl AsRef < str > ,
12+ limit_total_runnable : usize ,
13+ ) {
1014 let mut base_bots: Vec < BaseBot > = QueryEngine :: default ( )
1115 . get_bots ( parsed_sql_file. as_ref ( ) , limit_total_runnable as u8 )
1216 . await
Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ mod query_engine;
77use tracing:: { error, info} ;
88
99pub use crate :: command_builder:: AutomateBuilderBase ;
10+ #[ cfg( target_os = "windows" ) ]
11+ #[ cfg( not( target_os = "unix" ) ) ]
12+ pub use crate :: db_info:: DbInfo ;
13+ #[ cfg( not( target_os = "windows" ) ) ]
14+ #[ cfg( target_os = "linux" ) ]
1015pub use crate :: db_info:: { sql_password_from_env, sql_user_from_env, DbInfo } ;
1116pub use crate :: dispatch:: { cli_dispatch, query_database} ;
1217// use bulk_runner_bots::{BaseBot, Bot};
Original file line number Diff line number Diff line change @@ -5,20 +5,20 @@ use crate::prelude::*;
55use crate :: { Dispatchable , Packet } ;
66
77pub struct Runner {
8- process : String ,
9- concurrency_limit : usize ,
8+ process : String ,
9+ concurrency_limit : usize ,
1010 limit_total_runnable : usize ,
11- sql_file_contents : String ,
11+ sql_file_contents : String ,
1212}
1313
1414impl From < Cli > for Runner {
1515 #[ inline]
1616 fn from ( cli : Cli ) -> Self {
1717 Runner {
18- process : cli. process ( ) . to_string ( ) ,
19- concurrency_limit : cli. concurrency_limit ( ) ,
18+ process : cli. process ( ) . to_string ( ) ,
19+ concurrency_limit : cli. concurrency_limit ( ) ,
2020 limit_total_runnable : cli. limit_total_runnable ( ) ,
21- sql_file_contents : cli. serialize_sql_file ( ) . unwrap_or ( "bots.sql" . to_string ( ) ) ,
21+ sql_file_contents : cli. serialize_sql_file ( ) . unwrap_or ( "bots.sql" . to_string ( ) ) ,
2222 }
2323 }
2424}
You can’t perform that action at this time.
0 commit comments