Git Product home page Git Product logo

django-async-downloads's People

Contributors

ben-qr avatar dave-v avatar max-nicholson avatar mikucz avatar msegun avatar naomicrosthwaite avatar nick-solly avatar roblee32 avatar samspriggs94 avatar sarahboyce avatar taliraj avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

pombredanne

django-async-downloads's Issues

Optional exception raise for downloads

Raise exception if download was removed from cache during download process (user click to clear download, during uncompleted process).

Exception will be raised depend on function new keyword argument.

Thanks to that celery tasks will be killed instantly.

Refactor for npm

If the JS is packaged and available on npm with appropriate module exports, then it can be webpacked when included in other projects. This would also require that templates do not rely on global scope for function definitions (e.g. downloads.html calls clearDownload).

bug: the result file is truncated

When the large file is saved.
The bug does not appear on v 0.3.0 and below.

We think that (this probably occurs when the max_size has been reached) bytes remaining in the buffer do not get saved into the temp_file.

Possible solution is to force remaining bytes into the rawstream by calling temp_file.flush() before line 89 in async_downloads/cache.py

    writer = csv.writer(temp_file, lineterminator="\n")
    for row in iterable:
        writer.writerow(row)
    temp_file.flush()
    default_storage.save(download["filepath"], temp_file._file.buffer)

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.