Commit 1b053092 authored by Alok Saldanha's avatar Alok Saldanha
Browse files

added cache status

parent 1e1de198
......@@ -161,8 +161,7 @@ def filecrawl():
@app.route("/view/<path:path>", methods=["GET", "PUT", "POST"])
def do_GET(path):
def do_view(path):
dataset = get_dataset(path)
file_path = get_file_path(dataset)
match = cache.check_entry(dataset)
......@@ -182,6 +181,11 @@ def do_GET(path):
elif match.status == "error":
raise ProcessException.from_pid_object(match)
@app.route("/cache_status", methods=["GET"])
def do_GET_status():
return render_template(
"cache_status.html", entry_list=cache.entry_list
def main():
Copyright 2019 Novartis Institutes for BioMedical Research Inc. Licensed
under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy
of the License at Unless
required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
OR CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the License.
<title>Cellxgene Gateway - FILE CRAWLER</title>
<script src=""></script>
<link rel="icon" type="image/png" href="{{ url_for('static', filename='nibr.ico') }}">
{% for script in extra_scripts %}
<script src="{{ script }}"></script>
{% endfor %}
<link rel="stylesheet" href="" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<header class="navbar navbar-expand navbar-dark flex-column flex-md-row bd-navbar">
<h3>Cellxgene Gateway - Cache Status</h3>
<table class="table">
{% for entry in entry_list %}
<td>{{ }}</td>
<td>{{ entry.dataset }}</td>
<td>{{ entry.port }}</td>
<td>{{ entry.launchtime }}</td>
<td>{{ entry.timestamp }}</td>
<td>{{ entry.status }}</td>
<td>{{ entry.message }}</td>
<td>{{ entry.http_status }}</td>
{% endfor %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment