def METHOD_NAME(sender, instance, **kwargs):
    user = instance.user
    if user:
        conn = get_redis_connection("notification")
        username = user if isinstance(user, basestring) else user.username
        key = "task_users:{}:{}".format(username, instance.id)
        params = {
            'task_id': instance.id,
            'task_name': instance.task_name.split('.')[-1],
            'task_status': instance.task_status,
            'user': username, 'arguments': instance.arguments,
            'database_name': instance.database_name or '',
            'updated_at': int(time.mktime(instance.updated_at.timetuple())),
            'is_new': 1,
            'read': 0
        }
        old_value = conn.hgetall(key)
        if old_value and params.get('task_status') == old_value.get('task_status'):
                params['is_new'] = old_value['is_new']
                params['read'] = old_value['read']
        conn.hmset(key, params)
        conn.expire(key, 1200)