Skip to content
Snippets Groups Projects
Commit 1f13c25c authored by Jonah Husson's avatar Jonah Husson
Browse files

don't try to thread initial creation of ephemerals

parent e58f6f86
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ func (nb *Impl) initCreator() {
// Add all missed ephemeral IDs
// increment by offsetPhase up to 5 minutes from now making ephemerals
for endTime := time.Now().Add(creationLead); lastEpochTime.Before(endTime); lastEpochTime = lastEpochTime.Add(time.Duration(offsetPhase)) {
go nb.addEphemerals(lastEpochTime)
nb.addEphemerals(lastEpochTime)
}
// handle the next epoch
_, epoch := ephemeral.HandleQuantization(lastEpochTime)
......@@ -85,6 +85,6 @@ func (nb *Impl) deleteEphemerals(start time.Time) {
_, currentEpoch := ephemeral.HandleQuantization(start)
err := nb.Storage.DeleteOldEphemerals(currentEpoch)
if err != nil {
jww.WARN.Printf("failed to update ephemerals: %+v", err)
jww.WARN.Printf("failed to delete ephemerals: %+v", err)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment