Skip to content

Commit

Permalink
[PINAX-200] used glob to filter files
Browse files Browse the repository at this point in the history
  • Loading branch information
Francois Blanchette committed Jul 28, 2023
1 parent e6b7ad9 commit 7d8d176
Show file tree
Hide file tree
Showing 5 changed files with 469 additions and 48 deletions.
3 changes: 2 additions & 1 deletion bin/cli.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node
import { commander } from "substreams-sink";
import { action, DEFAULT_ADDRESS, DEFAULT_PORT, DEFAULT_SCRAPE_INTERVAL, DEFAULT_CSV_ROOT, DEFAULT_FOLDER_GRANULAR, DEFAULT_FILE_GRANULAR } from "../index.js"
import { action, DEFAULT_VERBOSE, DEFAULT_ADDRESS, DEFAULT_PORT, DEFAULT_SCRAPE_INTERVAL, DEFAULT_CSV_ROOT, DEFAULT_FOLDER_GRANULAR, DEFAULT_FILE_GRANULAR } from "../index.js"
import { actionExportCsv, actionImportCsv } from "../src/csv.js"
import { handleLabels } from "../src/prom.js";

Expand Down Expand Up @@ -28,6 +28,7 @@ commander.run(cmdCsv, pkg).name("export")
// csv import
cmdCsv.command("import")
.description("Import csv")
.option('--verbose', 'Enable verbose logging', DEFAULT_VERBOSE)
.option('-p --port <int>', 'Listens on port number.', String(DEFAULT_PORT))
.option('-a --address <string>', 'VictoriaMetrics address to connect.', DEFAULT_ADDRESS)
.option('--csv-root <string>', 'CSV root', String(DEFAULT_CSV_ROOT))
Expand Down
1 change: 1 addition & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const DEFAULT_COLLECT_DEFAULT_METRICS = false;
export const DEFAULT_CSV_ROOT = './csv'
export const DEFAULT_FOLDER_GRANULAR = 1000
export const DEFAULT_FILE_GRANULAR = 100
export const DEFAULT_VERBOSE = false

// Custom user options interface
export interface ActionOptions extends commander.RunOptions {
Expand Down
Loading

0 comments on commit 7d8d176

Please sign in to comment.