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

Valvoline integration #1581

Open
kristopolous opened this issue Feb 19, 2020 · 1 comment
Open

Valvoline integration #1581

kristopolous opened this issue Feb 19, 2020 · 1 comment

Comments

@kristopolous
Copy link
Member

kristopolous commented Feb 19, 2020

There's a few tasks:

  1. Add a field "last_oil_change" to the cars table.
  2. Have a task that runs every X number of days, say between 3-7. It does this:
if current_mileage > last_oil_change + oil_change_constant:
  remind_user_to_get_oil_change
  1. Have a way of getting the PDF receipts (either through an email address that fires a script or some SMTP module or some email service with a CRUD api),
    a. run it prior to the other task
    b. have it do something like this
for each object in parsed_pdf:
  update_last_oil_change_for_car
  thank_user_for_getting_oil_change

some notes:

  1. Have the pdf sent to another email address in case we somehow need to rerun things
  2. Since the last_oil_change information is destroyed and replaced we need to log that we're doing this along with the car/value that is about to be replaced in case we somehow screw up and need to fix things.
  3. The pdf parsing approach is both idempotent and re-entrent. All it would do is just replace the column value with the new one. The first task isn't of course since we aren't tracking whether we already notified the user or not ... but that's not the complicated line of action, so I don't really care.
@kristopolous
Copy link
Member Author

Push data to airtable

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