Skip to content

Commit

Permalink
update tagdag function
Browse files Browse the repository at this point in the history
  • Loading branch information
AbrarQuazi committed Nov 6, 2024
1 parent 4dd91e2 commit a94ede3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions tools/wake/describe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ std::ostream &operator<<(std::ostream &os, const GraphNode &node) {
return os << std::endl;
}

JAST create_tagdag(Database &db, const std::string &tagExpr) {
void output_tagdag(Database &db, const std::string &tagExpr) {
RE2 exp(tagExpr);

// Pick only those tags that match the RegExp
Expand Down Expand Up @@ -622,5 +622,5 @@ JAST create_tagdag(Database &db, const std::string &tagExpr) {
}
}

return out;
std::cout << out << std::endl;
}
2 changes: 1 addition & 1 deletion tools/wake/describe.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,6 @@ struct DescribePolicy {
};

void describe(const std::vector<JobReflection> &jobs, DescribePolicy policy, const Database &db);
JAST create_tagdag(Database &db, const std::string &tag);
void output_tagdag(Database &db, const std::string &tag);

#endif
3 changes: 1 addition & 2 deletions tools/wake/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,7 @@ void inspect_database(const CommandLineOptions &clo, Database &db) {
// tagdag and history are db inspection queries, but are very different from the
// rest of the queries which operate on the jobs table.
if (clo.tagdag) {
JAST json = create_tagdag(db, clo.tagdag);
std::cout << json << std::endl;
output_tagdag(db, clo.tagdag);
} else if (clo.history) {
query_runs(db);
} else {
Expand Down

0 comments on commit a94ede3

Please sign in to comment.