Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completing task within vit would hang #20

Open
pekcheey opened this issue Aug 5, 2021 · 1 comment
Open

completing task within vit would hang #20

pekcheey opened this issue Aug 5, 2021 · 1 comment

Comments

@pekcheey
Copy link

pekcheey commented Aug 5, 2021

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. :)

@linuxcaffe
Copy link

linuxcaffe commented Aug 5, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants