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

Send an email digest with suggested tasks based on skills #1039

Open
joshsmith opened this issue Oct 10, 2017 · 4 comments
Open

Send an email digest with suggested tasks based on skills #1039

joshsmith opened this issue Oct 10, 2017 · 4 comments

Comments

@joshsmith
Copy link
Contributor

Problem

We want to send an email that uses the (yet unfinished) task matcher to send an email digest with perhaps the top three most recommended, unassigned, open tasks for a user based on their skills.

We can attempt to send this once a week using Quantum jobs.

We'll likely need to be add in some sort of system for being able to unsubscribe from these emails so that future emails don't accidentally end up in spam.

Each task should list:

  • skills (both matching and not matching)
  • when the task was created

Ideally we would also factor in the task priority, but that might be a polish step.

@joshsmith joshsmith added this to the 🚀 Tasks MVP milestone Oct 10, 2017
@begedin
Copy link
Contributor

begedin commented Oct 10, 2017

Unlike our async stuff, quantum would make sense here, since it provides a syntax parser for tasks scheduling.

What we need

  • wrap up task matcher in UserTaskMatcher gets tasks with most overlapping skills fixes #736 #752 - I think for now, we should focus on getting A matcher done. It doesn't have to be great
  • write module which uses task matcher to load data and create the email ~2 hours
  • write module which performs the above for each user ~4 hours. I'm expecting difficulties here as to how the users are loaded and their own email template data is generated
  • add quantum, add config schedule to call the above module at a certain time in the week ~ 1 hour

The last step is the easy part. Past the initial setup described in the documentation, we just need to add something like

config :code_corps, CodeCorps.Scheduler,
  jobs: [
    task_suggestions: [
      schedule: "@weekly",
      task: {ModuleInStep3, :send_all},
    ]
  ]

to our config. Instead of @weekly, we can use some other setting, to specify a certain time each week, for example, from the synthax

 ┌───────────── minute (0 - 59)
 │ ┌───────────── hour (0 - 23)
 │ │ ┌───────────── day of month (1 - 31)
 │ │ │ ┌───────────── month (1 - 12)
 │ │ │ │ ┌───────────── day of week (0 - 6) (Sunday to Saturday;
 │ │ │ │ │                                       7 is also Sunday on some systems)
 │ │ │ │ │
 │ │ │ │ │
 * * * * *  command to execute

0 12 * * 1 would mean the email is sent every monday (1st day of week), at noon (12 hours, 0 minutes).

@joshsmith
Copy link
Contributor Author

I should add:

  • design and implement the email template itself ~4 hours

@begedin
Copy link
Contributor

begedin commented Oct 11, 2017

@joshsmith How do you feel about converting this into a milestone?

@joshsmith
Copy link
Contributor Author

That’s fine but it could just as easily go in the tasks mvp milestone as separate issues.

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

No branches or pull requests

2 participants