Code Monkey home page Code Monkey logo

Comments (4)

ndmitchell avatar ndmitchell commented on May 5, 2024

Take a look at https://github.com/ndmitchell/bake/blob/master/src/Development/Bake/Core/GC.hs#L20, which exports a function garbageCollect, and explains its arguments. Running that every 20 minutes in a loop seems reasonable. I don't call bake gc anymore, just garbageCollect directly, but looking at the command line arguments should give you a clue what bake gc does, once you know garbageCollect.

As an example, garbageCollect (20*1024*1024*1024) 0.20 (5*60*60) ["."] will make sure there is 20Gb free, there is 20% of the drive free, and it will only delete things over 5 hours old.

from bake.

abailly avatar abailly commented on May 5, 2024

OK. I actually looked at it but was expecting to be able to run it as an external command so that I can schedule it in a cron for example. Given that I run server and client in a docker container, I was having trouble understanding how bake gc could work without connecting to server... There seemed to be missing a --server argument which bake client uses.

So IIRC I should put it somewhere in my server, e.g. like a thread or something and not try to use it as an external command?

from bake.

ndmitchell avatar ndmitchell commented on May 5, 2024

bake gc works on the client or the server - it will GC whichever disk you run it on - we currently do both server and client. Running it as a thread in your server is a good approach.

from bake.

ndmitchell avatar ndmitchell commented on May 5, 2024

I'll leave this issue to document how to do it - the information from this ticket should be duplicated somewhere.

from bake.

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.