more solid task updating, no need to stop the main loop to avoid race conditions
This commit is contained in:
@@ -8,15 +8,12 @@ from flask import Blueprint, render_template
|
||||
from .dm import dmbp
|
||||
from .get_period_times import (
|
||||
get_period_totals,
|
||||
read_and_extract,
|
||||
task_file,
|
||||
get_work_period_totals,
|
||||
task_or_none,
|
||||
timezone,
|
||||
get_work_period_totals,
|
||||
)
|
||||
|
||||
|
||||
|
||||
class DMHTMLCalendar(calendar.HTMLCalendar):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
@@ -148,7 +145,9 @@ def workmonth(month=None, year=None):
|
||||
cal.setcalmonth(usemonth)
|
||||
cal.setcalyear(useyear)
|
||||
|
||||
return render_template("calendar.html", content=cal.formatmonth(useyear, usemonth), auto_refresh=False)
|
||||
return render_template(
|
||||
"calendar.html", content=cal.formatmonth(useyear, usemonth), auto_refresh=False
|
||||
)
|
||||
|
||||
|
||||
@dmbp.route("/month")
|
||||
@@ -174,4 +173,6 @@ def month(month=None, year=None, task=None):
|
||||
cal.setcalmonth(usemonth)
|
||||
cal.setcalyear(useyear)
|
||||
|
||||
return render_template("calendar.html", content=cal.formatmonth(useyear, usemonth), auto_refresh=True)
|
||||
return render_template(
|
||||
"calendar.html", content=cal.formatmonth(useyear, usemonth), auto_refresh=True
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user