commit 47e6e47

default  ·  2023-01-04 08:41:02 +0000 UTC
parent 845df51
The purge ttl for stray global objects have been shortened.
2 files changed,  +2, -3
M data.c
M snac.h
M data.c
+1, -2
 1@@ -1483,12 +1483,11 @@ static void _purge_subdir(snac *snac, const char *subdir, int days)
 2 void purge_server(void)
 3 /* purge global server data */
 4 {
 5-    int tpd = xs_number_get(xs_dict_get(srv_config, "timeline_purge_days"));
 6     xs *spec = xs_fmt("%s/object/??", srv_basedir);
 7     xs *dirs = xs_glob(spec, 0, 0);
 8     char *p, *v;
 9 
10-    time_t mt = time(NULL) - tpd * 24 * 3600;
11+    time_t mt = time(NULL) - 7 * 24 * 3600;
12 
13     p = dirs;
14     while (xs_list_iter(&p, &v)) {
M snac.h
+1, -1
1@@ -1,7 +1,7 @@
2 /* snac - A simple, minimalistic ActivityPub instance */
3 /* copyright (c) 2022 grunfink - MIT license */
4 
5-#define VERSION "2.17"
6+#define VERSION "2.18-dev"
7 
8 #define USER_AGENT "snac/" VERSION
9