@@ -41,6 +41,7 @@ int usage()
41
41
<< std::endl;
42
42
std::cerr << " Host name or IP address of running pyth_tx server\n "
43
43
<< std::endl;
44
+ std::cerr << " -i <interval with which to send notify_price_sched notifications, in milliseconds (default 1000) >" << std::endl;
44
45
std::cerr << " -k <key_store_directory (default " << get_key_store ()
45
46
<< " )>]" << std::endl;
46
47
std::cerr << " Directory name housing publishing, mapping and program"
@@ -102,14 +103,16 @@ int main(int argc, char **argv)
102
103
std::string tx_host = get_tx_host ();
103
104
int pyth_port = get_port ();
104
105
int opt = 0 ;
106
+ int pub_int = 1000 ;
105
107
unsigned max_batch_size = 0 ;
106
108
bool do_wait = true , do_tx = true , do_ws = true , do_debug = false ;
107
- while ( (opt = ::getopt (argc,argv, " r:s:t:p:k:w:c:l:m:b:dnxhz" )) != -1 ) {
109
+ while ( (opt = ::getopt (argc,argv, " r:s:t:p:i: k:w:c:l:m:b:dnxhz" )) != -1 ) {
108
110
switch (opt) {
109
111
case ' r' : rpc_host = optarg ; break ;
110
112
case ' s' : secondary_rpc_host = optarg ; break ;
111
113
case ' t' : tx_host = optarg ; break ;
112
114
case ' p' : pyth_port = ::atoi (optarg ); break ;
115
+ case ' i' : pub_int = ::atoi (optarg ); break ;
113
116
case ' k' : key_dir = optarg ; break ;
114
117
case ' c' : cap_file = optarg ; break ;
115
118
case ' w' : cnt_dir = optarg ; break ;
@@ -149,6 +152,7 @@ int main(int argc, char **argv)
149
152
mgr.set_do_ws ( do_ws );
150
153
mgr.set_do_capture ( !cap_file.empty () );
151
154
mgr.set_commitment ( cmt );
155
+ mgr.set_publish_interval ( pub_int );
152
156
153
157
bool do_secondary = !secondary_rpc_host.empty ();
154
158
if ( do_secondary ) {
0 commit comments