Giter VIP home page Giter VIP logo

Comments (4)

danth avatar danth commented on June 12, 2024 3

If a large transfer was ran inline during the API request, it could cause the request to time out, therefore interrupting the download. Cron jobs should be allowed to run for a much longer time before they are killed.

If every download was started immediately, we could end up with too many running at once, if lots of users requested transfers at the same time. I would like to keep some form of queue for this reason. However, there is no reason to wait 5 minutes for the next cron job to be triggered before starting to process the queue, if nothing is running already.

NCDownloader works around the waiting time by using Aria2 as a download manager, however I would prefer to keep the Transfer app simple to install, by not requiring any additional software on the server. This seems like something which could be improved in the main code of Nextcloud instead. It would be good to get all queued jobs started as soon as possible, both from this app and from others. Perhaps a background daemon which is always running, and waits for another job when it has nothing to do.

from transfer.

TtuxX avatar TtuxX commented on June 12, 2024

I agree but I'm afraid that such a change at the core of NextCloud would take a long time :(
I'm trying to think about two other possibilities :

Case of a forced triggering of cron.php:

Wouldn't it be possible for the Transfer application to immediately (I'm not sure how) trigger the execution of a cron job by executing immediately by itself the php -f /var/www/nextcloud/cron.php system command?
That would reduce a lot the initial cron execution random delay.

Or:

Case of immediate download with a simple request:

Wouldn't it be possible otherwise to, in the admin settings:

  • Have an option to activate an immediate "dumb" download as soon as a link is submitted
  • Have also an option to set the maximum number of simultaneous direct "dumb" downloads allowed per user during an immediate download (for example maximum 2)?

from transfer.

z0rgster avatar z0rgster commented on June 12, 2024

Would it be possible to set a "small file size limit"? Then the job could start immediately and if the file download is completed within that limit, everything is fine. If not, the job is paused/terminated and continued/restarted by the cron job.

This would be really useful for pulling files like pdfs (device manuals etc.) into the nextcloud without waiting.

from transfer.

danth avatar danth commented on June 12, 2024

I had previously tried to implement this, but unfortunately a lot of websites don't allow us to determine the file size (via a HTTP HEAD request) without starting the download. For that reason many small files would end up having to be queued anyway.

I suppose we could begin the download every time and interrupt it when the file size is known to be above the limit.

from transfer.

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.