[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taldir] branch master updated: add purge option
From: |
gnunet |
Subject: |
[taler-taldir] branch master updated: add purge option |
Date: |
Fri, 10 Jan 2025 10:52:57 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository taldir.
The following commit(s) were added to refs/heads/master by this push:
new 00bcb22 add purge option
00bcb22 is described below
commit 00bcb22c27898d9a90ff2fca54776c117783732f
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Fri Jan 10 10:52:54 2025 +0100
add purge option
---
pkg/rest/taldir.go | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pkg/rest/taldir.go b/pkg/rest/taldir.go
index a451b01..206e266 100644
--- a/pkg/rest/taldir.go
+++ b/pkg/rest/taldir.go
@@ -811,7 +811,11 @@ func (t *Taldir) Initialize(cfgfile string) {
if err := t.Db.AutoMigrate(&validation{}); err != nil {
panic(err)
}
-
+ if
t.Cfg.Section("taldir").Key("purge_mappings_on_startup_dangerous").MustBool(false)
{
+ log.Println("DANGER Purging mappings!")
+ tx := t.Db.Where("1 = 1").Delete(&entry{})
+ log.Printf("Deleted %d entries.\n", tx.RowsAffected)
+ }
// Clean up validations
validationExpStr :=
t.Cfg.Section("taldir").Key("validation_expiration").MustString("24h")
validationExp, err := time.ParseDuration(validationExpStr)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-taldir] branch master updated: add purge option,
gnunet <=