Giter Site home page Giter Site logo

Comments (5)

landonreed avatar landonreed commented on June 28, 2024

@cgalant, you're right that this needs fixing, but I wonder if a better approach would be to initialize the FeedStore when the application starts up. It probably shouldn't be a static field on FeedVersion (we've been refactoring away a lot of the static fields/methods on these model classes).

@abyrd what are your thoughts here? If we move feedStore = new FeedStore(); to DataManager::main, we could have the application fail fast with a clear warning. I think I might prefer the application failing on this rather than accidentally creating directories where they're not supposed to be, but I am open to creating them automatically (or some other approach) if the above seems incorrect.

from datatools-server.

cgalant avatar cgalant commented on June 28, 2024

@landonreed, any news ? I still got the error in the last mongo-pojo branch update !

from datatools-server.

landonreed avatar landonreed commented on June 28, 2024

A simple fix for your implementation is to only reference existing directories in the config files. If you're meaning to have the feeds persist locally (rather than stored on s3), the directory for gtfs should not be placed in /tmp (for other implementations we typically place them somewhere like var/data/gtfs/.

I think the true issue here is that the application does not fail on startup if the directory does not exist. I stand by my initial preference that the application should error if a directory for gtfs files does not exist, rather than creating them automatically. Do you have any input on this approach @cgalant?

from datatools-server.

abyrd avatar abyrd commented on June 28, 2024

@landonreed I don't think it's a problem to require directories to exist, but we do want to fail fast in that case. As I understand it you already began refactoring to remove static fields and could change this behavior in that set of changes, which is nonbreaking and can be applied as a point release after our main release incorporating RDBMS functionality.

from datatools-server.

landonreed avatar landonreed commented on June 28, 2024

That's correct @abyrd. I will share these changes in a PR after we release the mongo-pojo version (and reference this issue). As a quick fix, however, I did add a change (which has been removed in the set of changes I'm working on for the point release) that makes the application fail fast.

from datatools-server.

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.