mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
clarify purpose of trialVersion by changing the name to handleTrialDeadline and adding a doc string
This commit is contained in:
parent
136a4b8068
commit
b89dae01cc
3 changed files with 7 additions and 3 deletions
2
lattice
2
lattice
|
|
@ -1 +1 @@
|
|||
Subproject commit fa773628a276e2590785a87fbc236c7e88ea6284
|
||||
Subproject commit 28c2313ecfcd7e083d42d4e409483e968b4c421b
|
||||
|
|
@ -285,7 +285,7 @@ func (m *Command) SetupServer() error {
|
|||
|
||||
m.logger.Printf("%s", pilosa.VersionInfo())
|
||||
|
||||
trialVersion(m.logger)
|
||||
handleTrialDeadline(m.logger)
|
||||
|
||||
// If the pilosa command line uses -tx to override the
|
||||
// PILOSA_TXSRC env variable, then we must also correct
|
||||
|
|
|
|||
|
|
@ -27,7 +27,11 @@ import (
|
|||
"github.com/pilosa/pilosa/v2"
|
||||
)
|
||||
|
||||
func trialVersion(logger loggerLogger) {
|
||||
// handleTrialDeadline checks to see if this is a trial version of Molecula that expires at some point.
|
||||
// If it is, we contact an NTP server to get the current time and compare that to the trial deadline.
|
||||
// We launch two goroutines, one which reminds via a log message how much time is left in the trial,
|
||||
// and one which causes the process to exit once the trial is over.
|
||||
func handleTrialDeadline(logger loggerLogger) {
|
||||
if pilosa.TrialDeadline != "" {
|
||||
startTime, err := ntpServerTime(4, logger)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue