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

shift_redcap_dates.py does not terminate if one of the spawned processed has error #83

Open
tashrifbillah opened this issue Jul 11, 2023 · 0 comments

Comments

@tashrifbillah
Copy link
Contributor

It should because we added this block:

sigint_handler= signal.signal(signal.SIGINT, signal.SIG_IGN)
pool= Pool(ncpu)
signal.signal(signal.SIGINT, sigint_handler)
try:
pool.map_async(_shift_date, files, error_callback=RAISE)
except KeyboardInterrupt:
pool.terminate()
else:
pool.close()
pool.join()

Way to reproduce

Just remove an entry from date_offset.csv that is in the beginning of date_offset.csv. Though we expect to see KeyError, it does not show anything. Rather it hangs indefinitely.

Interim solution

Make sure to run set_date_shifts.py so all entries are available in date_offset.csv.

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

1 participant