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

Why does the script not run when the hash text file is created? #6

Closed
radianrad opened this issue Jun 29, 2018 · 2 comments
Closed

Comments

@radianrad
Copy link

The text file that is created upon successfully finding a sooner time prevent the script from running again. Is this only if it's the same appointments?

@Drewster727
Copy link
Owner

Drewster727 commented Jul 1, 2018

goes-notify/goes-notify.py

Lines 129 to 132 in 85fcf98

hash = hashlib.md5(''.join(dates) + current_apt.strftime('%B %d, %Y @ %I:%M%p')).hexdigest()
fn = "goes-notify_{0}.txt".format(hash)
if settings.get('no_spamming') and os.path.exists(fn):
return

This prevents additional notifications when the same available dates are found.

It basically takes all of the "better" available dates and your current interview date (which you set in the config file) and creates a unique hash code. If any of those items changes on subsequent runs, you will get notified (assuming the available dates are better than your current interview date).

Does that make sense?

@radianrad
Copy link
Author

Makes total sense! Neat solution.

Thanks!

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