summaryrefslogtreecommitdiff
path: root/src/mongo/util/periodic_runner.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/periodic_runner.h')
-rw-r--r--src/mongo/util/periodic_runner.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mongo/util/periodic_runner.h b/src/mongo/util/periodic_runner.h
index d7ecb1c7f1b..0373d8ed0dc 100644
--- a/src/mongo/util/periodic_runner.h
+++ b/src/mongo/util/periodic_runner.h
@@ -60,8 +60,11 @@ public:
using JobAnchor = PeriodicJobAnchor;
struct PeriodicJob {
- PeriodicJob(std::string name, Job callable, Milliseconds period)
- : name(std::move(name)), job(std::move(callable)), interval(period) {}
+ PeriodicJob(std::string name, Job callable, Milliseconds period, bool isKillableByStepdown)
+ : name(std::move(name)),
+ job(std::move(callable)),
+ interval(period),
+ isKillableByStepdown(isKillableByStepdown) {}
/**
* name of the job
@@ -77,6 +80,11 @@ public:
* An interval at which the job should be run.
*/
Milliseconds interval;
+
+ /**
+ * Whether this job is killable during stepdown.
+ */
+ bool isKillableByStepdown;
};
/**