14 #include "application.hh" 23 int main(
int argc,
char** argv )
25 LINFO(
plog,
"Welcome to Psyllid\n\n" <<
26 "\t\t _/ _/ _/ _/ \n" <<
27 "\t\t _/_/_/ _/_/_/ _/ _/ _/ _/ _/_/_/ \n" <<
28 "\t\t _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ \n" <<
29 "\t\t _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ \n" <<
30 "\t\t _/_/_/ _/_/_/ _/_/_/ _/ _/ _/ _/_/_/ \n" <<
37 scarab::main_app the_main;
44 the_main.callback( [&](){ the_server.
execute( the_main.master_config() ); } );
47 the_main.add_config_option< std::string >(
"-b,--broker",
"amqp.broker",
"Set the dripline broker address" );
48 the_main.add_config_option<
unsigned >(
"-p,--port",
"amqp.broker-port",
"Set the port for communication with the dripline broker" );
49 the_main.add_config_option< std::string >(
"-e,--exchange",
"amqp.exchange",
"Set the exchange to send message on" );
50 the_main.add_config_option< std::string >(
"-a,--auth-file",
"amqp.auth-file",
"Set the authentication file path" );
51 the_main.add_config_option< std::string >(
"-s,--slack-queue",
"amqp.slack-queue",
"Set the queue name for Slack messages" );
52 the_main.add_config_flag<
bool >(
"--post-to-slack",
"post-to-slack",
"Flag for en/disabling posting to Slack" );
53 the_main.add_config_flag<
bool >(
"--activate-at-startup",
"daq.activate-at-startup",
"Flag to make Psyllid activate on startup" );
54 the_main.add_config_option<
unsigned >(
"-n,--n-files",
"daq.n-files",
"Number of files to be written in parallel" );
55 the_main.add_config_option<
unsigned >(
"-d,--duration",
"daq.duration",
"Run duration in ms" );
56 the_main.add_config_option<
double >(
"-m,--max-file-size-mb",
"daq.max-file-size-mb",
"Maximum file size in MB" );
62 CLI11_PARSE( the_main, argc, argv );
66 catch( scarab::error& e )
68 LERROR(
plog,
"configuration error: " << e.what() );
73 LERROR(
plog,
"psyllid error: " << e.
what() );
76 catch( std::exception& e )
78 LERROR(
plog,
"std::exception caught: " << e.what() );
83 LERROR(
plog,
"unknown exception caught" );
const char * what() const
static scarab::logger plog("batch_executor")
int main(int argc, char **argv)
LOGGER(plog, "egg_writer")
Contains default server configuration.
void execute(const scarab::param_node &a_config)
Sets up daq_control, strea_manager and request_receiver. Registers request handles.