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
|
|
@ -5,7 +5,7 @@ from django.utils.html import strip_tags
|
|||
from django.conf import settings
|
||||
|
||||
# Third party imports
|
||||
from django_rq import job
|
||||
from celery import shared_task
|
||||
from sentry_sdk import capture_exception
|
||||
from slack_sdk import WebClient
|
||||
from slack_sdk.errors import SlackApiError
|
||||
|
|
@ -14,7 +14,7 @@ from slack_sdk.errors import SlackApiError
|
|||
from plane.db.models import Workspace, User, WorkspaceMemberInvite
|
||||
|
||||
|
||||
@job("default")
|
||||
@shared_task
|
||||
def workspace_invitation(email, workspace_id, token, current_site, invitor):
|
||||
try:
|
||||
workspace = Workspace.objects.get(pk=workspace_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue