Async: push_account_last_seen_task.apply_async(args=[Account.id], countdown=100)

def push_account_last_seen_task(obj_id):
    """
    Async: push_account_last_seen_task.apply_async(args=[Account.id], countdown=100)
    """
    lock_id = "%s-push-account-last-seen-%s" % (settings.ENV_PREFIX, obj_id)  # noqa: E731
    acquire_lock = lambda: cache.add(lock_id, "true", LOCK_EXPIRE)  # noqa: E731
    # lock is not released on purpose. We want 5 mins cache for subsequent calls.
    # release_lock = lambda: cache.delete(lock_id)

    if acquire_lock():
        intercom_user = False
        UserModel = get_user_model()
        try:
            instance = UserModel.objects.get(pk=obj_id)
            data = {
                "user_id": instance.intercom_id,
                "email": instance.email,
                "name": instance.get_full_name(),
                "last_request_at": instance.last_login.strftime("%s") if instance.last_login else "",
            }
            if not getattr(settings, "SKIP_INTERCOM", False):
                intercom_user = intercom.users.create(**data)

            if intercom_user:
                UserModel.objects.filter(pk=obj_id).update(
                    intercom_last_api_response=intercom_user.__dict__,
                    intercom_api_response_timestamp=make_aware(datetime.now(), pytz.UTC)
                )
        except UserModel.DoesNotExist:
            raise