Browse Source

Updated RELEASE_NOTES.

default 2 years ago
parent
commit
459ba627e6
2 changed files with 3 additions and 3 deletions
  1. 1 1
      RELEASE_NOTES.md
  2. 2 2
      data.c

+ 1 - 1
RELEASE_NOTES.md

@@ -2,7 +2,7 @@
 
 ## 2.06
 
-The purge is managed internally, so there is no longer a need to add a cron job for that.
+The purge is managed internally, so there is no longer a need to add a cron job for that. If you don't want any timeline data to be purged, set `timeline_purge_days` to 0.
 
 ## 2.05
 

+ 2 - 2
data.c

@@ -1028,8 +1028,6 @@ void purge(snac *snac)
 /* do the purge */
 {
     int tpd = xs_number_get(xs_dict_get(srv_config, "timeline_purge_days"));
-    time_t mt = time(NULL) - tpd * 24 * 3600;
-    char *p, *v;
 
     /* purge days set to 0? disable purging */
     if (tpd == 0) {
@@ -1037,8 +1035,10 @@ void purge(snac *snac)
         return;
     }
 
+    time_t mt  = time(NULL) - tpd * 24 * 3600;
     xs *t_spec = xs_fmt("%s/timeline/" "*.json", snac->basedir);
     xs *t_list = xs_glob(t_spec, 0, 0);
+    char *p, *v;
 
     p = t_list;
     while (xs_list_iter(&p, &v)) {