Giter Site home page Giter Site logo

Comments (1)

monsieurtanuki avatar monsieurtanuki commented on July 26, 2024

Hi @g123k!

The way background tasks work:

  • immediately setting the local product with the new changes
  • immediately giving back to the user the control of the app
  • putting a task in a queue, which is re-run on specific common events (e.g. opening a product page)

I don't know the "weird problems" you're talking about: could you please be more specific?

  • If it's that the server isn't updated at the same time as the app, that's not a bug, that's a feature: we can update products offline or when the server is down.
  • If it's that local data seems to change, it happens if the server doesn't change the data itself, cf. #5394: the user changes the local data, the user sees the changed data locally, the server is called but doesn't change the data, the app downloads the unchanged data, the local data reverts to the value before the user change.

Would it be worth to let users know a bit about background tasks, with a sort of access to the current queue? Definitely. I'm pretty sure most of them have already downloaded a file and seen the download progress.

Some solutions to have more active processes:

  • splitting into several queues - e.g. one queue for the "simple" background tasks and one queue dedicated to heavy stuff like photo upload
  • calling BackgrounsTaskManager.run() in more cases

from smooth-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.