Application Framework Reference

App Server Utilities API

push_version()

The push_version() method gets the current application push_version value.

The push_version variable is a local-to-installed-instance version number, which is combined with the build number to revise static resources in %SPLUNK_HOME/etc/apps/<appName>/appserver/static. This number is incremented by a POST to /_bump, forcing the client to fetch the new version of any modified resource, regardless of the Expires headers that were sent with it.

Synopsis

push_version = push_version()

Return Value

String

Current push_version value.

Example

from splunk.appserver.mrsparkle.lib import util
def incr_push_version(self):
    new_version = cherrypy.config['_push_version'] = util.push_version() + 1 
    f = open(util.make_absolute('var/run/splunk/push-version.txt'), 'w')
    f.write(str(new_version))
    f.close()
    return new_version