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

Fix: As an operator, new shop notification is sent #48

Closed
2 tasks
chrisjsimpson opened this issue Jan 5, 2023 · 2 comments
Closed
2 tasks

Fix: As an operator, new shop notification is sent #48

chrisjsimpson opened this issue Jan 5, 2023 · 2 comments
Labels

Comments

@chrisjsimpson
Copy link
Contributor

chrisjsimpson commented Jan 5, 2023

Is your feature request related to a problem? Please describe.

builder/__init__.py:225
Telegram not sent: Working outside of request context.

This typically means that you attempted to use functionality that needed
an active HTTP request.  Consult the documentation on testing for
information about how to avoid this problem

Cause:

request cannot be used in this context: https://github.com/Subscribie/module-builder/blob/main/__init__.py#L40 because request is executed as a background task.

Describe the solution you'd like
Suggestion:

        client_ip = get_client_ip()
        
        lambda: submit_new_site_build(
            form,
            domain,
            subdomain,
            login_token,
            app_config,
            session=session_dict,  # noqa: E501
           client_ip,
        )
    )  # noqa: E501

Describe alternatives you've considered

Additional context

No calls to request can never be placed inside the [task_queue](https://github.com/Subscribie/module-builder/blob/987d67ede41ceeecfb5b81ae23e5d347d920baeb/__init__.py#L174) because they execute outside of the request context.

@github-actions
Copy link

github-actions bot commented Jan 6, 2023

🚀 Issue was released in v0.0.1 🚀

@github-actions
Copy link

github-actions bot commented Jan 6, 2023

🚀 Issue was released in v0.0.1 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant