35int main(
int argc,
char** argv) {
36 google::ParseCommandLineFlags(&argc, &argv,
true);
37 if (FLAGS_restored_output_dir.empty()) {
38 FLAGS_restored_output_dir =
39 absl::StrCat(FLAGS_source_records_dir,
"_restored");
41 AINFO <<
"input dir: " << FLAGS_source_records_dir
42 <<
". output dir: " << FLAGS_restored_output_dir
43 <<
". config file: " << FLAGS_smart_recorder_config_filename
44 <<
". program name: " << argv[0];
46 ACHECK(GetProtoFromFile(FLAGS_smart_recorder_config_filename, &trigger_conf))
47 <<
"Failed to load triggers config file "
48 << FLAGS_smart_recorder_config_filename;
50 FLAGS_source_records_dir, FLAGS_restored_output_dir));
51 if (!FLAGS_real_time_trigger) {
53 FLAGS_source_records_dir, FLAGS_restored_output_dir));
55 if (!processor->Init(trigger_conf)) {
56 AERROR <<
"failed to init record processor";
59 if (!processor->Process()) {
60 AERROR <<
"failed to process records";
Post processor against recorded tasks that have been completed
bool GetProtoFromFile(const std::string &file_name, google::protobuf::Message *message)
Parses the content of the file specified by the file_name as a representation of protobufs,...