mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Bugfixes and Docker dev test script
This commit is contained in:
@@ -462,8 +462,12 @@ def start_db():
|
||||
dbstatus['healthy'] = True
|
||||
|
||||
# inform time module about begin of scrobbling
|
||||
firstscrobble = sqldb.get_scrobbles()[0]
|
||||
register_scrobbletime(firstscrobble['time'])
|
||||
try:
|
||||
firstscrobble = sqldb.get_scrobbles()[0]
|
||||
register_scrobbletime(firstscrobble['time'])
|
||||
except IndexError:
|
||||
register_scrobbletime(int(datetime.datetime.now().timestamp()))
|
||||
|
||||
|
||||
# create cached information
|
||||
cached.update_medals()
|
||||
|
||||
@@ -68,11 +68,12 @@ def setup():
|
||||
newpw = prompt("Please set a password for web backend access. Leave this empty to generate a random password.",skip=SKIP,secret=True)
|
||||
if newpw is None:
|
||||
newpw = randomstring(32)
|
||||
newpw_repeat = newpw
|
||||
print("Generated password:",col["yellow"](newpw))
|
||||
else:
|
||||
newpw_repeat = prompt("Please type again to confirm.",skip=SKIP,secret=True)
|
||||
if newpw != newpw_repeat: print("Passwords do not match!")
|
||||
else: auth.defaultuser.setpw(newpw)
|
||||
auth.defaultuser.setpw(newpw)
|
||||
|
||||
if malojaconfig["SEND_STATS"] is None:
|
||||
answer = ask("I would like to know how many people use Maloja. Would it be okay to send a daily ping to my server (this contains no data that isn't accessible via your web interface already)?",default=True,skip=SKIP)
|
||||
|
||||
@@ -284,6 +284,7 @@ def run_server():
|
||||
|
||||
try:
|
||||
#run(webserver, host=HOST, port=MAIN_PORT, server='waitress')
|
||||
log(f"Listening on {HOST}:{PORT}")
|
||||
waitress.serve(webserver, host=HOST, port=PORT, threads=THREADS)
|
||||
except OSError:
|
||||
log("Error. Is another Maloja process already running?")
|
||||
|
||||
Reference in New Issue
Block a user