Some anniversary badges are awarded one day and one year after the last anniversary badge

Its a bug, but I think this is one of those ones that is PR welcome, our design is:

  1. Once a day we go hunting for new people to give anniversary badges to
  2. We only consider people who did not get an anniversary badge in the previous 1 year.

Trouble is … this only runs once a day at an arbitrary time, this means the job always runs late, sometimes 1 hour late, some times 23 hours late.

Given we are only granting badges once a day we would need to change our logic to:

  1. Fish for candidates
  2. set the created_at: at the correct offset instead of using end_date

Not an impossible fix by any means, but fiddly.

2 Likes