def main():
    # use date as asset_version because it is unique at the time of deploy
    now = utcnow()
    asset_version = now.strftime("%Y%m%d%H%M%S")
    slog("New asset version: %s" % asset_version)
    c = StaticAssetVersionCache()
    c.cache_store(asset_version)
Пример #2
0
def main():
    # use date as asset_version because it is unique at the time of deploy
    now = utcnow()
    asset_version = now.strftime('%Y%m%d%H%M%S')
    slog('New asset version: %s' % asset_version)
    c = StaticAssetVersionCache()
    c.cache_store(asset_version)
Пример #3
0
def get_asset_version():
    """Get asset_version from cache
    This value is updated whenever we deploy. See fab_helpers.py

    If not available from cache, default value is current date.
    """
    c = StaticAssetVersionCache()
    asset_version = c.get()
    if asset_version is None:
        now = utcnow()
        asset_version = now.strftime('%Y%m%d%H')
    return asset_version
Пример #4
0
def get_asset_version():
    """Get asset_version from cache
    This value is updated whenever we deploy. See fab_helpers.py

    If not available from cache, default value is current date.
    """
    c = StaticAssetVersionCache()
    asset_version = c.get()
    if asset_version is None:
        now = utcnow()
        asset_version = now.strftime('%Y%m%d%H')
    return asset_version