Coder Social home page Coder Social logo

Comments (5)

JosephKav avatar JosephKav commented on July 28, 2024

Doing queries now on https://api.github.com/repos/go-vikunja/frontend/releases, https://api.github.com/repos/go-vikunja/frontend/releases and https://api.github.com/repos/allinurl/goaccess/releases gives me the 992aaf92b487506974e4305db4a64326866f3ed48b2ba424cef8fbe4e28f72b0 ETag. Was it giving you 1202860668f8cc09802a90038fa4ff8cdc642644697a3ef85aace4bd6ed91973 when you tried last week?

I'm thinking that the ETag for empty releases isn't constant, so just do the first query with no ETag, and if that query on /releases gives an empty list, then switch that Service to /tags. Would double the API calls for repos using tags instead of releases, but only on the very first queries for each Service on startup

from argus.

ThinkChaos avatar ThinkChaos commented on July 28, 2024

Trying again with Firefox I get the same ETag I had last week (1202...), but with curl I get the same one you do 992a....
Using Firefox's dev tools "copy as curl" I get a third ETag: 40d7791495f98777a75dd6d73d7794658c7df79d296af9c37bf97c9c3aa11ecc.
Hardcoding one of the "empty" ETags doesn't seem to have a downside so, if simple, why not? But as you said the cost is very low, so it's definitely not a big deal without either.
I just mentioned the ETag since I saw other requests use them :)

from argus.

JosephKav avatar JosephKav commented on July 28, 2024

Ah, good that it's not changed in a week.
I'll add this as a default, and on startup, do a query with that default and update the default if that's changed. I'm also adding a check for a 200 response being an empty list (incase that etag changes whilst the app is running), and having that update the default and trigger the fallback query

from argus.

ThinkChaos avatar ThinkChaos commented on July 28, 2024

Amazing, thanks!

I'll update and test later today :)
(Didn't get notified by the PRs, would've tested then otherwise!)

from argus.

ThinkChaos avatar ThinkChaos commented on July 28, 2024

Works great, thanks!

from argus.

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.