mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	rebase
This commit is contained in:
		
							parent
							
								
									1fdb78b05d
								
							
						
					
					
						commit
						afd664d8f2
					
				@ -5,7 +5,9 @@ const double downloadFailed = -2;
 | 
				
			|||||||
// Number of log entries to retain on app start
 | 
					// Number of log entries to retain on app start
 | 
				
			||||||
const int kLogTruncateLimit = 250;
 | 
					const int kLogTruncateLimit = 250;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Duration for backgroun sync
 | 
					// Duration for background sync
 | 
				
			||||||
const Duration kBackgroundSyncDuration = Duration(minutes: 1);
 | 
					const Duration kBackgroundSyncDuration = Duration(minutes: 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Hash batch limits
 | 
				
			||||||
const int kBatchHashFileLimit = 128;
 | 
					const int kBatchHashFileLimit = 128;
 | 
				
			||||||
const int kBatchHashSizeLimit = 1024 * 1024 * 1024; // 1GB
 | 
					const int kBatchHashSizeLimit = 1024 * 1024 * 1024; // 1GB
 | 
				
			||||||
 | 
				
			|||||||
@ -60,7 +60,6 @@ class SyncApiRepository implements ISyncApiRepository {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      await for (final chunk in response.stream.transform(utf8.decoder)) {
 | 
					      await for (final chunk in response.stream.transform(utf8.decoder)) {
 | 
				
			||||||
        previousChunk += chunk;
 | 
					        previousChunk += chunk;
 | 
				
			||||||
        // ignore: move-variable-outside-iteration
 | 
					 | 
				
			||||||
        final parts = previousChunk.toString().split('\n');
 | 
					        final parts = previousChunk.toString().split('\n');
 | 
				
			||||||
        previousChunk = parts.removeLast();
 | 
					        previousChunk = parts.removeLast();
 | 
				
			||||||
        lines.addAll(parts);
 | 
					        lines.addAll(parts);
 | 
				
			||||||
 | 
				
			|||||||
@ -50,14 +50,13 @@ Future<T?> runInIsolate<T>(
 | 
				
			|||||||
      await Future.delayed(Durations.short2);
 | 
					      await Future.delayed(Durations.short2);
 | 
				
			||||||
      return result;
 | 
					      return result;
 | 
				
			||||||
    } catch (error, stack) {
 | 
					    } catch (error, stack) {
 | 
				
			||||||
      // Log the error and stack trace
 | 
					 | 
				
			||||||
      log.severe(
 | 
					      log.severe(
 | 
				
			||||||
        "Error in runInIsolate${debugLabel == null ? '' : ' for $debugLabel'}",
 | 
					        "Error in runInIsolate${debugLabel == null ? '' : ' for $debugLabel'}",
 | 
				
			||||||
        error,
 | 
					        error,
 | 
				
			||||||
        stack,
 | 
					        stack,
 | 
				
			||||||
      );
 | 
					      );
 | 
				
			||||||
    } finally {
 | 
					    } finally {
 | 
				
			||||||
      // Always close the new database connection on Isolate end
 | 
					      // Always close the new db connection on Isolate end
 | 
				
			||||||
      ref.read(driftProvider).close();
 | 
					      ref.read(driftProvider).close();
 | 
				
			||||||
      ref.read(dbProvider).close();
 | 
					      ref.read(dbProvider).close();
 | 
				
			||||||
      ref.read(isarProvider).close();
 | 
					      ref.read(isarProvider).close();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user