mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-25 00:43:38 +00:00
The purge ttl for stray global objects have been shortened.
This commit is contained in:
parent
845df51686
commit
47e6e47323
2 changed files with 2 additions and 3 deletions
3
data.c
3
data.c
|
@ -1483,12 +1483,11 @@ static void _purge_subdir(snac *snac, const char *subdir, int days)
|
|||
void purge_server(void)
|
||||
/* purge global server data */
|
||||
{
|
||||
int tpd = xs_number_get(xs_dict_get(srv_config, "timeline_purge_days"));
|
||||
xs *spec = xs_fmt("%s/object/??", srv_basedir);
|
||||
xs *dirs = xs_glob(spec, 0, 0);
|
||||
char *p, *v;
|
||||
|
||||
time_t mt = time(NULL) - tpd * 24 * 3600;
|
||||
time_t mt = time(NULL) - 7 * 24 * 3600;
|
||||
|
||||
p = dirs;
|
||||
while (xs_list_iter(&p, &v)) {
|
||||
|
|
2
snac.h
2
snac.h
|
@ -1,7 +1,7 @@
|
|||
/* snac - A simple, minimalistic ActivityPub instance */
|
||||
/* copyright (c) 2022 grunfink - MIT license */
|
||||
|
||||
#define VERSION "2.17"
|
||||
#define VERSION "2.18-dev"
|
||||
|
||||
#define USER_AGENT "snac/" VERSION
|
||||
|
||||
|
|
Loading…
Reference in a new issue