Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: call set_code_owner_attribute_from_module directly in send_task #130

Merged
merged 7 commits into from
Oct 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions eventtracking/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from celery.utils.log import get_task_logger
from celery import shared_task
from edx_django_utils.monitoring import set_code_owner_attribute
from edx_django_utils.monitoring import set_code_owner_attribute_from_module
from eventtracking.tracker import get_tracker
from eventtracking.processors.exceptions import (
NoBackendEnabled,
Expand All @@ -19,7 +19,6 @@


@shared_task(bind=True)
@set_code_owner_attribute
def send_event(self, backend_name, processed_event):
"""
Send event to configured top-level backend asynchronously.
Expand All @@ -36,6 +35,7 @@ def send_event(self, backend_name, processed_event):
backend_name (str): name of the backend to use
processed_event (dict): Processed event dict
"""
set_code_owner_attribute_from_module(self.__module__)
try:
tracker = get_tracker()
backend = tracker.backends[backend_name]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def load_requirements(*requirements_paths):

setup(
name='event-tracking',
version='1.1.3',
version='1.1.4',
packages=find_packages(),
include_package_data=True,
license='AGPLv3 License',
Expand Down