35 {
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");
40 }
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];
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));
54 }
55 if (!processor->Init(trigger_conf)) {
56 AERROR <<
"failed to init record processor";
57 return -1;
58 }
59 if (!processor->Process()) {
60 AERROR <<
"failed to process records";
61 return -1;
62 }
63 return 0;
64}
Post processor against recorded tasks that have been completed
Realtime processor against recorded tasks that are being recorded
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,...