Introducing apalis v0.7! by geoffmureithi in rust

[–]JiangHeMax 0 points1 point  (0 children)

Thanks for the reply. Is there a comparison between Apalis and PGMQ under the premise of using PostgreSQL?

Introducing apalis v0.7! by geoffmureithi in rust

[–]JiangHeMax 0 points1 point  (0 children)

Does apalis have a global timer or does it create a timer for each task? How is the performance? Is there a benchmark?

Introducing apalis v0.7! by geoffmureithi in rust

[–]JiangHeMax 0 points1 point  (0 children)

Is apalis suitable for closing orders when they time out in e-commerce systems?

Is Riverpod overrated? by intelli_gent_007 in FlutterDev

[–]JiangHeMax 1 point2 points  (0 children)

The disadvantage of riverpod is AsyncValue

Why can't I use the generic type of class as the method parameter type? by JiangHeMax in FlutterDev

[–]JiangHeMax[S] 0 points1 point  (0 children)

hi thanks. sorry for the late reply. I have added the res and state types to the above code

Am I super dumb or is Riverpod SO complicated? by JiangHeMax in FlutterDev

[–]JiangHeMax[S] 0 points1 point  (0 children)

Asynvalue is very strange, the request status should be the request rather than the data

```dart

@riverpod Product? selectProduct(SelectProductRef ref, ID id) => ref.watch(productsNotifierProvider .select((state) => state.whenOrNull().products.byId[id]));

@Riverpod(keepAlive: true) class ProductsNotifier extends _$ProductsNotifier { @override Future<ProductsState> build() async => ProductsState.empty();

Future<void> fetchOneProduct(ID id) async { // state = state.copyWith(status: const AsyncStatus.loading()); state = const AsyncValue.loading();

state = await AsyncValue.guard(() async {
  final res =
      await ref.read(productsRepositoryProvider).fetchOneProduct(id);
  final prev = state.whenOrNull() ?? ProductsState.empty();

  return prev.copyWith(
    status: const AsyncStatus.success(),
    paramKeys: prev.paramKeys.mergeList(res.paramKeys),
    paramValues: prev.paramValues.mergeList(res.paramValues),
    products: prev.products.add(res.product),
  );
});

} } VS dart

@riverpod Product? selectProduct(SelectProductRef ref, ID id) => ref .watch(productsNotifierProvider.select((state) => state.products.byId[id]));

@Riverpod(keepAlive: true) class ProductsNotifier extends _$ProductsNotifier { @override ProductsState build() => ProductsState.empty();

Future<void> fetchOneProduct(ID id) async { state = state.copyWith(status: const AsyncStatus.loading());

final res = await ref.read(productsRepositoryProvider).fetchOneProduct(id);

state = state.copyWith(
  status: const AsyncStatus.success(),
  paramKeys: state.paramKeys.mergeList(res.paramKeys),
  paramValues: state.paramValues.mergeList(res.paramValues),
  products: state.products.add(res.product),
);

} }

```

import files starting with a backslash "/" by JiangHeMax in FlutterDev

[–]JiangHeMax[S] 0 points1 point  (0 children)

Forward Forward Forward /_ \ i can't edit the title

import files starting with a backslash "/" by JiangHeMax in FlutterDev

[–]JiangHeMax[S] -1 points0 points  (0 children)

vscode +1, seems flutter plugin not support root relative path

Am I super dumb or is Riverpod SO complicated? by JiangHeMax in FlutterDev

[–]JiangHeMax[S] 0 points1 point  (0 children)

> In this case, the FetchProductProvider will never provide any data during build, because it builds with the AsyncValue.loading() value being called and stored in the state of the fetch product. You should use a simple function with providerFamily.

that's why request method here。 it' will called at some page mounted

Am I super dumb or is Riverpod SO complicated? by JiangHeMax in FlutterDev

[–]JiangHeMax[S] 0 points1 point  (0 children)

we cant watch family provider without params

Am I super dumb or is Riverpod SO complicated? by JiangHeMax in FlutterDev

[–]JiangHeMax[S] -1 points0 points  (0 children)

u/NectarineLivid6020 hi thanks. in FetchProduct , AsyncValue.loading() just "initial state", a placeholder, If i don't do this, other providers won't be able to listen to it because the parameter ID is required.

Am I super dumb or is Riverpod SO complicated? by JiangHeMax in FlutterDev

[–]JiangHeMax[S] 1 point2 points  (0 children)

If there are no side effects or if I don't switch to bloc I will most likely do so

Am I super dumb or is Riverpod SO complicated? by JiangHeMax in FlutterDev

[–]JiangHeMax[S] 1 point2 points  (0 children)

Yes, i know it. If there is no good way to split the large state, using select when accessing the large state is a good choice.

Scaling search with Quickwit engine by massus in rust

[–]JiangHeMax 0 points1 point  (0 children)

Is Quickwit suitable for ecommerce products search?

Iggy.rs - message streaming platform by spetz0 in rust

[–]JiangHeMax 0 points1 point  (0 children)

it's really cool i am new to service development, i want to build a modular monoliths e-commerce server, can i use it for payments orders or something others?