rsync method

  1. @override
Future<void> rsync(
  1. ShadertoyStore metadataStore,
  2. VaultStore assetStore,
  3. HybridSyncMode mode, {
  4. SyncTaskRunner? runner,
  5. int? concurrency,
  6. int? timeout,
  7. List<String> playlistIds = const <String>[],
})
override

Synchronizes the metadataStore with the remote shadertoy data.

  • metadataStore: A ShadertoyStore implementation to store the metadata
  • assetStore: A VaultStore implementation to store shader and user assets
  • mode: Specifies the mode used on the synchronization, either full or newest
  • concurrency: Maximum number of simultaneous requests
  • timeout: Request timeout in seconds
  • playlistIds: The playlists to synchronize

Implementation

@override
Future<void> rsync(
    ShadertoyStore metadataStore, VaultStore assetStore, HybridSyncMode mode,
    {SyncTaskRunner? runner,
    int? concurrency,
    int? timeout,
    List<String> playlistIds = const <String>[]}) async {
  final shaderProcessor = ShaderSyncProcessor(this, metadataStore, assetStore,
      runner: runner, concurrency: concurrency, timeout: timeout);
  final shaderSyncResult = await shaderProcessor.syncShaders(mode);

  final userProcessor = UserSyncProcessor(this, metadataStore, assetStore,
      runner: runner, concurrency: concurrency, timeout: timeout);
  final userSyncResult =
      await userProcessor.syncUsers(shaderSyncResult, mode);

  final playlistProcessor = PlaylistSyncProcessor(
      this, metadataStore, assetStore,
      runner: runner, concurrency: concurrency, timeout: timeout);
  await playlistProcessor.syncPlaylists(
      shaderSyncResult, userSyncResult, playlistIds);
}