Skip to content

Instantly share code, notes, and snippets.

@stuartchaney
Last active December 23, 2022 04:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stuartchaney/aa57afb1b01097588399361ae4af1a4e to your computer and use it in GitHub Desktop.
Save stuartchaney/aa57afb1b01097588399361ae4af1a4e to your computer and use it in GitHub Desktop.
time_ago = 1.day.ago
expected_customer_ids = s.orders.where(fulfillment_status: "fulfilled", remote_updated_at: time_ago..).pluck(:customer_id).uniq
actual_customer_ids = s.points_logs.where(applied_at: time_ago..).pluck(:customer_id).uniq
missing = expected_customer_ids - actual_customer_ids
######
ids = [6710280782089, 6509421658377, 6710941188361, 6711069212937, 6509565411593, 6711239704841, 6508219203849]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment