20 const bool follow = arguments.has_flag(
"follow");
21 const int64_t until_checkpoint = arguments.get_option<int64_t>
25 std::numeric_limits<int64_t>::max()
36 if (!parsed_client.get())
38 arguments.print_help(std::cerr) <<
'\n';
39 parsed_client.print_help(std::cerr);
43 Client &client = *parsed_client.get();
50 logger.get().log(
"joedb_push invoked with --follow: waiting for data");
54 client.get_connection_checkpoint() < until_checkpoint &&
58 client.push_if_ahead(until_checkpoint);
67int main(
int argc,
char **argv)
Class for conveniently parsing command-line arguments.
Handle concurrent access to a file with a joedb::Connection.
virtual int64_t push_if_ahead(int64_t until)=0
@ read_existing
fails if does not exist
bool interruptible_sleep(std::chrono::milliseconds duration)
int main_wrapper(int(*main)(Arguments &), int argc, char **argv)
Process command-line arguments and catch exceptions from main.