diff options
Diffstat (limited to 'morph-cache-server')
-rwxr-xr-x | morph-cache-server | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/morph-cache-server b/morph-cache-server index ad102bf..c0c23f5 100755 --- a/morph-cache-server +++ b/morph-cache-server @@ -304,20 +304,12 @@ class MorphCacheServer(cliapp.Application): response.status = 404 logging.debug('artifact %s does not exist' % basename) - @app.get('/postartifacts') - def artifact(): - return ''' - <form action="/postartifacts" method="post"> - artifacts: <input name="artifacts" type="text" /> - </form> - ''' - - @app.post('/postartifacts') - def do_artifacts(): + @app.post('/artifacts') + def post_artifacts(): artifacts = request.forms.get('artifacts').split(',') results = {} - logging.debug('Received a POST request for /postartifacts') + logging.debug('Received a POST request for /artifacts') for artifact in artifacts: logging.debug('Checking whether artifact %s is in the cache' @@ -326,6 +318,8 @@ class MorphCacheServer(cliapp.Application): filename = os.path.join(self.settings['artifact-dir'], basename) results[artifact] = os.path.exists(filename) + logging.debug('%s is%s in the cache' % + (artifact, '' if result[artifact] else "n't")) return results |