refactor: move all background task from rqworker to celery (#668)
* refactor: move all background task from rqworker to celery * dev: update background job to take input in parameters rather than a single dict * dev: update procfile for new worker * dev: docker updates for new celery worker
This commit is contained in:
parent
100c431ac3
commit
ec818a5523
22 changed files with 150 additions and 162 deletions
|
|
@ -4,13 +4,12 @@ from django.template.loader import render_to_string
|
|||
from django.utils.html import strip_tags
|
||||
|
||||
# Third party imports
|
||||
from django_rq import job
|
||||
from celery import shared_task
|
||||
from sentry_sdk import capture_exception
|
||||
|
||||
|
||||
@job("default")
|
||||
@shared_task
|
||||
def magic_link(email, key, token, current_site):
|
||||
|
||||
try:
|
||||
realtivelink = f"/magic-sign-in/?password={token}&key={key}"
|
||||
abs_url = "http://" + current_site + realtivelink
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue