Skip to content

Commit

Permalink
start
Browse files Browse the repository at this point in the history
  • Loading branch information
jzbahrai committed Nov 12, 2024
1 parent c8f5494 commit a86635a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/celery/reporting_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
fetch_quarter_data,
update_fact_notification_status,
)
from app.models import Service
from app.models import Service, User


@notify_celery.task(name="create-nightly-billing")
Expand Down Expand Up @@ -182,4 +182,7 @@ def insert_quarter_data_for_annual_limits(process_day):
@notify_celery.task(name="send-quarterly-email")
@statsd(namespace="tasks")
def send_quarter_email():
pass
service_info = {x.id: (x.email_annual_limit, x.sms_annual_limit) for x in Service.query.all()}
service_ids = [service_id for service_id in service_info]
chunk_size = 20
iter_service_ids = iter(service_ids)
9 changes: 9 additions & 0 deletions app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,15 @@ class Config(object):
NEAR_DAILY_EMAIL_LIMIT_TEMPLATE_ID = "9aa60ad7-2d7f-46f0-8cbe-2bac3d4d77d8"
REACHED_DAILY_EMAIL_LIMIT_TEMPLATE_ID = "ee036547-e51b-49f1-862b-10ea982cfceb"
DAILY_EMAIL_LIMIT_UPDATED_TEMPLATE_ID = "97dade64-ea8d-460f-8a34-900b74ee5eb0"

REACHED_ANNUAL_SMS_LIMIT_TEMPLATE_ID = "ca6d9205-d923-4198-acdd-d0aa37725c37"
ANNUAL_SMS_LIMIT_UPDATED_TEMPLATE_ID = "8381fdc3-95ad-4219-b07c-93aa808b67fa"
NEAR_ANNUAL_SMS_LIMIT_TEMPLATE_ID = "1a7a1f01-7fd0-43e5-93a4-982e25a78816"
REACHED_ANNUAL_EMAIL_LIMIT_TEMPLATE_ID = "d27cd502-4e92-4aae-b55f-758fd22f0e79"
ANNUAL_EMAIL_LIMIT_UPDATED_TEMPLATE_ID = "47e764eb-b313-4833-a4a7-ae920a8f52f3"
NEAR_ANNUAL_EMAIL_LIMIT_TEMPLATE_ID = "b04123de-5cff-486d-903c-8afe7219950d"
ANNUAL_LIMIT_QUARTERLY_USAGE_TEMPLATE_ID = "f66a1025-17f5-471c-a7ab-37d6b9e9d304"

APIKEY_REVOKE_TEMPLATE_ID = "a0a4e7b8-8a6a-4eaa-9f4e-9c3a5b2dbcf3"
HEARTBEAT_TEMPLATE_EMAIL_LOW = "73079cb9-c169-44ea-8cf4-8d397711cc9d"
HEARTBEAT_TEMPLATE_EMAIL_MEDIUM = "c75c4539-3014-4c4c-96b5-94d326758a74"
Expand Down

0 comments on commit a86635a

Please sign in to comment.