Coder Social home page Coder Social logo

Comments (6)

lipis avatar lipis commented on August 28, 2024

I think they forgot to update the docs.. it was a bad idea to have it always 1 because you are usually using that for cache forever in the scripts or stylesheets as a query argument to make sure you're getting the updated one..

but it also not showing the current date or anything but something that it looks like random so in general it's not a problem for the dev environment..

in the issue #63 Jรถrn also wanted to fix it but it's not worth it if you ask me..

from gae-init.

mdxs avatar mdxs commented on August 28, 2024

Filled upstream as documentation issue; see https://code.google.com/p/googleappengine/issues/detail?id=10601

For gae-init, the problem seems to be that the random (?) number provided by the current implementation might not fit in the long that the CURRENT_VERSION_TIMESTAMP = long(CURRENT_VERSION_ID.split('.')[1]) >> 28 assignment is using; thus causing sometimes (I think... didn't test sufficiently yet) an exception which might leave some (later) assignments undefined... I'm not sure if there are any major negative outcomes (read: crashes) due to this, but it does provide some weird output on the development server... which might put some wannabee users off (because... if it doesn't work locally, why risk deploying?).

from gae-init.

lipis avatar lipis commented on August 28, 2024

The long in Python can be pretty long and basically there is no limit on what it can fit, the only problem with the local version is that the date is not accurate and it shows most of the time the future as addressed in the #63 as far as I can tell.. other than that I don't think that this can cause any other problems..

as for the misleading date or something.. we could probably document it..

from gae-init.

mdxs avatar mdxs commented on August 28, 2024

Should have caught it before... the error is a "timestamp out of range for platform time_t"

from gae-init.

mdxs avatar mdxs commented on August 28, 2024

When there is no exception caught I'm seeing (as admin) 1985, 2004, 2010, 2016 (future), 2003, 1972, etc based timestamps on the hello page.

When there has been an exception, it shows "a few seconds ago" and "Invalid date" on hoover over, looking at page source, the datetime="" on the time tag.

By dumping some more config values in the footer, it is also clear that when there is an exception that the new config.APPLICATION_ID is skipped and thus blank. Now, this can be worked around (just change the order), but I do like (part of) the @joernhees approach better:

# ... move the SERVER_SOFTWARE, DEVELOPMENT and friends stuff before the try

try:
  ...
  CURRENT_VERSION_NAME = CURRENT_VERSION_ID.split('.')[0]
  CURRENT_VERSION_TIMESTAMP = long(CURRENT_VERSION_ID.split('.')[1]) >> 28
  if DEVELOPMENT:
    CURRENT_VERSION_TIMESTAMP = long(datetime.now())
  CURRENT_VERSION_DATE = datetime.fromtimestamp(CURRENT_VERSION_TIMESTAMP)
  ...

from gae-init.

mdxs avatar mdxs commented on August 28, 2024

Hmm, above snippet doesn't cut it...

from gae-init.

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.