loopquery.py
changeset 91 fba99a54ec49
parent 78 64c62ac8f65d
child 93 b72591087495
equal deleted inserted replaced
90:43e5d2cf4ddb 91:fba99a54ec49
    20         self.parser.add_argument('-c', dest='config', type=str, help='Additional config file (besides pgtoolkit.conf).')
    20         self.parser.add_argument('-c', dest='config', type=str, help='Additional config file (besides pgtoolkit.conf).')
    21         self.parser.add_argument('-q', dest='queries', metavar='QUERY', nargs='*', help='Queries to run.')
    21         self.parser.add_argument('-q', dest='queries', metavar='QUERY', nargs='*', help='Queries to run.')
    22         self.parser.add_argument('--mins', dest='delay_mins', type=int, help='Delay between queries in minutes.')
    22         self.parser.add_argument('--mins', dest='delay_mins', type=int, help='Delay between queries in minutes.')
    23         self.parser.add_argument('--secs', dest='delay_secs', type=int, help='Delay between queries in seconds.')
    23         self.parser.add_argument('--secs', dest='delay_secs', type=int, help='Delay between queries in seconds.')
    24 
    24 
    25         self.config.add_argument('target', type=str, default=None)
    25         self.config.add_option('target', type=str, default=None)
    26         self.config.add_argument('queries', type=list, default=[])
    26         self.config.add_option('queries', type=list, default=[])
    27         self.config.add_argument('delay_mins', type=int, default=0)
    27         self.config.add_option('delay_mins', type=int, default=0)
    28         self.config.add_argument('delay_secs', type=int, default=0)
    28         self.config.add_option('delay_secs', type=int, default=0)
    29         self.config.add_argument('log_path', type=str)
    29         self.config.add_option('log_path', type=str)
    30 
    30 
    31         self.target_isolation_level = 'autocommit'
    31         self.target_isolation_level = 'autocommit'
    32 
    32 
    33         self.init()
    33         self.init()
    34 
    34