Git Product home page Git Product logo

Comments (7)

Samurai016 avatar Samurai016 commented on August 17, 2024 6

I found this method, it's working for me

var query = "DELETE FROM task";
FlutterDownloader.loadTasksWithRawQuery(query: query);

from flutter_downloader.

cbenhagen avatar cbenhagen commented on August 17, 2024 1

It does not matter how lightweight logs are. At some point they will fill your device when they are not rotated. I have seen servers run out of space because of logs. After some testing my download_tasks.db is already more than 5MB big. @hnvn please consider to reopen this issue.

from flutter_downloader.

hnvn avatar hnvn commented on August 17, 2024

on Android, every task information is saved to DB and I don't think that we need to clean it.

from flutter_downloader.

cbenhagen avatar cbenhagen commented on August 17, 2024

Sorry I don't see the point why we should keep old and even failed tasks around forever. Can you explain in what circumstances that could make sense? I mean even if there is a use case for it. There should at least be a way to clean it.

from flutter_downloader.

hnvn avatar hnvn commented on August 17, 2024

I agree with you that tasks already finished (with or without error) can be free to clean up. But I wonder about the condition to clean up tasks and when it should do. I think we just keep it simple and consider it like logs instead of paying attention to decide a task can be cleaned or not. Btw, task data is lightweight, it wouldn't cause any problem with your device space

from flutter_downloader.

codmajik avatar codmajik commented on August 17, 2024

Hi, there is also another part that needs considering, which is that loadTask returns all tasks, not providing a way to clean completed tasks means that eventually you app would be iterating over 5MB worth of task info just to find the task. @hnvn please consider a function to clear old downloads even if it is just a way to flag it so it doesn't show up in loadTask would be fine.

from flutter_downloader.

sriharsha-y avatar sriharsha-y commented on August 17, 2024

@hnvn Still there is no way to cleanup db ?

from flutter_downloader.

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.