added cal project
This commit is contained in:
@@ -9,8 +9,8 @@ import task
|
||||
from config import logger, switches
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
desktops = ("Plan", "Think", "Work", "Other", "Away", "Work", "Work")
|
||||
work_desktops = {2: "default", 5: "dlt", 6: "vhs"}
|
||||
desktops = ("Plan", "Think", "Work", "Other", "Away", "Work", "Work", "Work")
|
||||
work_desktops = {2: "default", 5: "dlt", 6: "vhs", 7: "cal"}
|
||||
|
||||
unlabeled = "Away"
|
||||
|
||||
@@ -60,7 +60,6 @@ while True:
|
||||
current_mtime = state.retrieve("current").get("filetime")
|
||||
file_mtime = task.get_file_mtime(None)
|
||||
|
||||
logger.debug(f"current_mtime: {current_mtime}, file_mtime:{file_mtime}")
|
||||
# First handle file changes
|
||||
if current_mtime != file_mtime:
|
||||
task_id = task.read_and_extract(None)
|
||||
@@ -86,9 +85,6 @@ while True:
|
||||
f"work/{work_desktops[current_workspace]}"
|
||||
)
|
||||
work_task_ids = {t["task_id"] for t in workspace_tasks if "task_id" in t}
|
||||
logger.debug(
|
||||
f"work_task_ids:{work_task_ids}, current_work_task: {current_work_task},current_task: {current_task}"
|
||||
)
|
||||
|
||||
# if current_task in work_task_ids and current_task != current_work_task:
|
||||
if current_task not in work_task_ids:
|
||||
@@ -97,6 +93,7 @@ while True:
|
||||
current_task = current_work_task
|
||||
state.save("current", task=current_task)
|
||||
task.db_to_file_as_is(None)
|
||||
|
||||
elif current_task != current_work_task:
|
||||
# Update work state when switching to a different valid task
|
||||
state.update_work_state(work_desktops[current_workspace], current_task)
|
||||
|
||||
@@ -7,7 +7,7 @@ import state
|
||||
from bson import ObjectId
|
||||
from config import logger, tasks
|
||||
|
||||
task_file = "/home/mariano/wdir/def/deskmeter/dmapp/dmcore/sample_task_file"
|
||||
task_file = "/home/mariano/LETRAS/adm/task/main"
|
||||
|
||||
|
||||
def parse_line(line: str) -> tuple[Optional[str], Optional[str]]:
|
||||
|
||||
Reference in New Issue
Block a user