Back to sc-rollups

SalesCandy Git archive

sc-rollups

Aggregates tenant data on a schedule and can trigger downstream report jobs.

README

This repository aggregates tenant data on a schedule, triggering downstream report jobs. It uses a sequence of AWS services (CloudWatch, SQS, Lambda) to process data and generate reports.

The process starts with a scheduled trigger, which groups tenants and sends messages to SQS. Subsequent functions process these messages to generate data in S3, trigger reports, and finally send emails.

Selected files and folders

  • README.md
  • app
  • package.json
  • serverless.yml

Reconstructed issues

Summaries inferred from the archive. Original issue records are unavailable here.

Report generation fails after Lambda throttling

Previously, if Lambda experienced throttling during report generation, the associated SQS messages could be lost, causing reports to fail silently. This change ensures message handling is robust against throttling.

a52c0bdf0fe4

Missing creation timestamp for subscribers

The subscriber data model was missing a reliable record of when a subscriber record was created. This update adds a `createdAt` column to accurately track this metadata.

8a03e095a0d1

Inaccurate timezone handling in reports

Report generation previously used an incorrect or inconsistent timezone setting, leading to date discrepancies in the final PDF reports. This fixes the timezone handling during report creation.

9c0cbfabb905

Selected commits

  1. Fix an issue with reports generation due to lambda throttles causing sqs messages to be lost

    Reza Rosli ·

    a52c0bdf0fe4d6a0514ae18188b6a6f06ae6886c

  2. Add a createdAt column when saving subscribers

    Reza Rosli ·

    8a03e095a0d1789491de100e4738eb2ada62a2f4

  3. Update elasticsearch client

    Reza Rosli ·

    74c029ce3ecb00412c3ab4f558164cfaab46d9f2

  4. Fix boolean conversion of testmode environment variable

    Reza Rosli ·

    652c2c5297919d3b9cf4d5cb621cb561cb9fce5d

  5. Fix date timezone in reports generation

    Reza Rosli ·

    9c0cbfabb9058d5f6969d1ebbce77bb7fcc4d0ab

  6. Get tenantId from permission

    Reza Rosli ·

    aebbac9d6ed54dbe647a56eb17448c511063ba9d

  7. Change handling of input arguments from Appsync

    Reza Rosli ·

    2b700afa8e95d6ae5a123f60c7342ad6a3a46376

  8. Adjust lambda memory allocation

    Reza Rosli ·

    6dd472aeec7f32511c78205e19474167af6adb45

  9. Fix code smells

    Reza Rosli ·

    2c32e811dad07f26a4b2f0e47eede509ef77349c

  10. Setup sonarqube

    Reza Rosli ·

    20bcab9242d6c4a26100eb2234735d99af8045f4

  11. Initial commit

    Reza Rosli ·

    0b5a854481757919409b783d34f09a9e271b05dc