How to use the carbonate.delete.deleteMetric function in carbonate

To help you get started, we’ve selected a few carbonate examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github graphite-project / carbonate / carbonate / cli.py View on Github external
parser.add_argument(
        '-f', '--metrics-file',
        default='-',
        help='File containing metric names to filter, or \'-\' ' +
             'to read from STDIN')

    args = parser.parse_args()

    if args.metrics_file and args.metrics_file[0] != '-':
        fi = args.metrics_file
    else:
        fi = []

    try:
        for metric in fileinput.input(fi):
            deleteMetric(metric, args.trash_dir)
    except KeyboardInterrupt:
        sys.exit(1)