-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
I use vit as a frontend to taskwarrior. and it hang while completing tasks with the hook installed. So I made the following workaround.
@@ -62,8 +62,10 @@ if (UDA_DUE in original or UDA_WAIT in original) and original['status']!='comple
pass # Thrown because of closing stdout. Don't worry, that's fine.
# Wait for taskwarrior to finish
- while (os.path.exists("/proc/%s" % str(task_pid))):
+ sleep_limit = 10 # work around for vit not closing
+ while (os.path.exists("/proc/%s" % str(task_pid)) and sleep_limit > 0):
time.sleep(0.25)
+ sleep_limit -=1
# Import the follow-up task
with tempfile.NamedTemporaryFile(mode="wt") as new_task:
I guess task_pid = os.getppid() is reading the ID of the vit process.
it's an ugly hack. but I'm just putting it here for reference for the next better solution. :)
Metadata
Metadata
Assignees
Labels
No labels