MeshLogCleanup

class MeshLogCleanup(meshLogRepository: MeshLogRepository, meshLogPrefs: MeshLogPrefs)(source)

Prunes the mesh log to the persisted retention policy. Android runs runOnce from MeshLogCleanupWorker on WorkManager's hourly schedule; desktop has no WorkManager and runs runHourly for as long as the app is open.

Constructors

Link copied to clipboard
constructor(meshLogRepository: MeshLogRepository, meshLogPrefs: MeshLogPrefs)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
suspend fun runHourly(): Nothing

Runs runOnce FIRST_RUN_DELAY after it is called and every INTERVAL after that, until the calling coroutine is cancelled. A failed pass is logged and the next one still runs, as WorkManager runs the next period after a failed one.

Link copied to clipboard
suspend fun runOnce()

One pass under the persisted policy. Failures propagate so each scheduler reports them its own way.