mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 09:42:26 -05:00
[feature] Customizable media cleaner schedule (#2304)
This commit is contained in:
parent
6fa80f164d
commit
4dc0547dc0
22 changed files with 300 additions and 98 deletions
|
|
@ -80,8 +80,10 @@ var testDefaults = config.Configuration{
|
|||
MediaDescriptionMinChars: 0,
|
||||
MediaDescriptionMaxChars: 500,
|
||||
MediaRemoteCacheDays: 7,
|
||||
MediaEmojiLocalMaxSize: 51200, // 50kb
|
||||
MediaEmojiRemoteMaxSize: 102400, // 100kb
|
||||
MediaEmojiLocalMaxSize: 51200, // 50kb
|
||||
MediaEmojiRemoteMaxSize: 102400, // 100kb
|
||||
MediaCleanupFrom: "00:00", // midnight.
|
||||
MediaCleanupEvery: 24 * time.Hour, // 1/day.
|
||||
|
||||
// the testrig only uses in-memory storage, so we can
|
||||
// safely set this value to 'test' to avoid running storage
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
package testrig
|
||||
|
||||
import (
|
||||
"github.com/superseriousbusiness/gotosocial/internal/cleaner"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/email"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/federation"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/media"
|
||||
|
|
@ -28,7 +29,7 @@ import (
|
|||
|
||||
// NewTestProcessor returns a Processor suitable for testing purposes
|
||||
func NewTestProcessor(state *state.State, federator *federation.Federator, emailSender email.Sender, mediaManager *media.Manager) *processing.Processor {
|
||||
p := processing.NewProcessor(typeutils.NewConverter(state), federator, NewTestOauthServer(state.DB), mediaManager, state, emailSender)
|
||||
p := processing.NewProcessor(cleaner.New(state), typeutils.NewConverter(state), federator, NewTestOauthServer(state.DB), mediaManager, state, emailSender)
|
||||
state.Workers.EnqueueClientAPI = p.Workers().EnqueueClientAPI
|
||||
state.Workers.EnqueueFediAPI = p.Workers().EnqueueFediAPI
|
||||
return p
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue