def task_track(request_info, task_info, event_type, event, page=None):
 full_event = dict(event, **task_info)
 with eventtracker.get_tracker().context('edx.course.task', contexts.course_context_from_url(page)):
  event = {'username': request_info.get('username', 'unknown'), 'ip': request_info.get('ip', 'unknown'), 'event_source': 'task', 'event_type': event_type, 'event': full_event, 'agent': request_info.get('agent', 'unknown'), 'page': page, 'time': datetime.datetime.utcnow(), 'host': request_info.get('host', 'unknown'), 'context': eventtracker.get_tracker().resolve_context()}
 log_event(event)

def task_track ( request_info , task_info , event_type , event , page = None ) : full_event = dict ( event , ** task_info ) with eventtracker . get_tracker ( ) . context ( 'edx.course.task' , contexts . course_context_from_url ( page ) ) : event = { 'username' : request_info . get ( 'username' , 'unknown' ) , 'ip' : request_info . get ( 'ip' , 'unknown' ) , 'event_source' : 'task' , 'event_type' : event_type , 'event' : full_event , 'agent' : request_info . get ( 'agent' , 'unknown' ) , 'page' : page , 'time' : datetime . datetime . utcnow ( ) , 'host' : request_info . get ( 'host' , 'unknown' ) , 'context' : eventtracker . get_tracker ( ) . resolve_context ( ) } log_event ( event )
logs tracking information for events occuring within celery tasks .