changes
This commit is contained in:
parent
6cb493eba7
commit
9b67cdacf1
5 changed files with 9 additions and 30 deletions
|
@ -6,4 +6,5 @@ sqlalchemy_utils==0.38.2
|
|||
python-dateutil==2.8.2
|
||||
Flask==2.1.2
|
||||
Flask-BasicAuth==0.2.0
|
||||
pyopenssl==22.0.0
|
||||
pyopenssl==22.0.0
|
||||
alembic==1.7.7
|
|
@ -176,7 +176,7 @@ class EnterGiveaways:
|
|||
# game_list = soup.find_all('div', {'class': 'giveaway__row-inner-wrap'})
|
||||
|
||||
if not len(unentered_game_list) or (all_games_list_count == pinned_giveaway_count):
|
||||
txt = f"〰️ We have run out of gifts to consider."
|
||||
txt = f"🟡 We have run out of gifts to consider."
|
||||
logger.info(txt)
|
||||
break
|
||||
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
</div>
|
||||
</header>
|
||||
<div class="container">
|
||||
<pre>{{config}}</pre>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
<pre>{{content}}</pre>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -17,19 +17,7 @@
|
|||
</div>
|
||||
</header>
|
||||
<div class="container">
|
||||
<pre id="output"></pre>
|
||||
<script>
|
||||
var output = document.getElementById('output');
|
||||
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', '{{ url_for('stream') }}');
|
||||
xhr.send();
|
||||
output.textContent = xhr.responseText;
|
||||
|
||||
setInterval(function() {
|
||||
output.textContent = xhr.responseText;
|
||||
}, 10000);
|
||||
</script>
|
||||
<pre id="output">{{content}}</pre>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -41,21 +41,13 @@ class WebServerThread(threading.Thread):
|
|||
def config():
|
||||
with open('../config/config.ini', 'r') as f:
|
||||
content = f.read()
|
||||
return render_template('configuration.html', config=content)
|
||||
return render_template('configuration.html', content=content)
|
||||
|
||||
@app.route(f"{self.app_root}log")
|
||||
def logs():
|
||||
return render_template('log.html')
|
||||
|
||||
@app.route(f"{self.app_root}stream")
|
||||
def stream():
|
||||
def generate():
|
||||
with open('../config/info.log') as f:
|
||||
while True:
|
||||
yield f.read()
|
||||
sleep(10)
|
||||
|
||||
return app.response_class(generate(), mimetype='text/plain')
|
||||
with open('../config/info.log', 'r') as f:
|
||||
content = f.read()
|
||||
return render_template('log.html', content=content)
|
||||
|
||||
@app.route(f"{self.app_root}alive")
|
||||
def alive():
|
||||
|
|
Loading…
Reference in a new issue