Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

carver: Refactor carver to use the Scheduler #6671

Merged
merged 4 commits into from
Oct 14, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Finish changes from code review
  • Loading branch information
Ted Reed committed Sep 27, 2020
commit 3860a4d1e187083315ae96eb1fab5b06dc32c161
3 changes: 1 addition & 2 deletions osquery/carver/carver_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ void updateCarveValue(const std::string& guid,
}

Status carvePaths(const std::set<std::string>& paths) {
Status s;
auto guid = generateNewUUID();

JSON tree;
Expand All @@ -74,7 +73,7 @@ Status carvePaths(const std::set<std::string>& paths) {
}

std::string out;
s = tree.toString(out);
auto s = tree.toString(out);
if (!s.ok()) {
VLOG(1) << "Failed to serialize carve paths: " << s.what();
return s;
Expand Down
2 changes: 1 addition & 1 deletion osquery/dispatcher/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ void SchedulerRunner::maybeRunDecorators(uint64_t time_step) {
}

void SchedulerRunner::maybeScheduleCarves(uint64_t time_step) {
if ((time_step & 60) == 0) {
if ((time_step % 60) == 0) {
scheduleCarves();
}
}
Expand Down