Skip to content

Commit

Permalink
Implement subscription task
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr committed Jan 22, 2017
1 parent 4e4d52a commit 6523796
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion redash/tasks/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ def version_check():
@celery.task(name="redash.tasks.subscribe")
def subscribe(form):
logger.info("Subscribing to: [security notifications=%s], [newsletter=%s]", form['security_notifications'], form['newsletter'])
# TOOD: implement actual subscription
data = {
'admin_name': form['name'],
'admin_email': form['email'],
'org_name': form['org_name'],
'security_notifications': form['security_notifications'],
'newsletter': form['newsletter']
}
requests.post('https://beacon.redash.io/subscribe', json=data)


@celery.task(name="redash.tasks.send_mail", base=BaseTask)
Expand Down

0 comments on commit 6523796

Please sign in to comment.