getPendingUploads method
Returns pending uploads whose next_retry_at <= now and attempts < maxRetries.
Implementation
Future<List<Map<String, dynamic>>> getPendingUploads(
DateTime now,
int maxRetries,
) async {
final db = await database;
return db.query(
'pending_uploads',
where: 'next_retry_at <= ? AND attempts < ?',
whereArgs: [now.toIso8601String(), maxRetries],
orderBy: 'created_at ASC',
);
}