keepResultsForAtLeast

Specifies that the results of this work should be kept for at least the specified amount
of time. After this time has elapsed, the results may be pruned at the discretion
of WorkManager when there are no pending dependent jobs.

When the results of a work are pruned, it becomes impossible to query for its
WorkInfo.

Specifying a long duration here may adversely affect performance in terms of app storage
and database query time.

Parameters

duration

long: The minimum duration of time (in timeUnit units) to keep the
results of this work