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

Updates contacts query for large lists #456

Merged

Conversation

kennethormandy
Copy link
Contributor

This Pull Request:

  1. Adds faster calculation of expected recipients for regular sendouts 11cfb80

    Now, the existing contact IDs are used to calculate the count. I did not implement that for other sendout types yet, but it falls back to the original approach. Without this change, I found the “expected recipients” spinner and sendouts element index could hang.

  2. Adds batch query when querying regular sendout recipients db87912

    Admittedly not my area of expertise, but as I understand it, this is the way to deal with the potential size of that query? It does seem to be working now.

Thanks very much!

@bencroker bencroker merged commit cffeae2 into putyourlightson:develop Mar 9, 2024
2 checks passed
@bencroker
Copy link
Collaborator

bencroker commented Mar 9, 2024

Thanks for the PR! I had some confusion and made a bit of a mess of your PR, which was in fact the right direction, after all. I’ll clean up and code and get things back on track.

bencroker added a commit that referenced this pull request Mar 9, 2024
commit d641372
Author: bencroker <ben@putyourlightson.com>
Date:   Fri Mar 8 20:24:19 2024 -0600

    Revert the fix, back to square 1

commit cffeae2
Merge: 6a3f170 b58bda0
Author: Ben Croker <57572400+bencroker@users.noreply.github.com>
Date:   Fri Mar 8 19:42:20 2024 -0600

    Merge pull request #456 from kennethormandy/contacts-batch-query

    Updates contacts query for large lists

commit 6a3f170
Author: bencroker <ben@putyourlightson.com>
Date:   Fri Mar 8 19:36:05 2024 -0600

    Fix too many parameters

    MySQL acccepts at most 65535 parameters, so it is important to use a `where` clause here.

commit b58bda0
Author: Ben Croker <57572400+bencroker@users.noreply.github.com>
Date:   Fri Mar 8 19:31:31 2024 -0600

    Remove batching, code cleanup

commit d267fbe
Author: Ben Croker <57572400+bencroker@users.noreply.github.com>
Date:   Fri Mar 8 18:54:44 2024 -0600

    Revert changes

commit 57e808a
Merge: 4b83e5c f289a4b
Author: Ben Croker <57572400+bencroker@users.noreply.github.com>
Date:   Fri Mar 8 18:45:24 2024 -0600

    Merge pull request #455 from kennethormandy/bugfix/missing-preflight-twig-variables

    Fixes missing memory limit and time limit Twig variables

commit db87912
Author: Kenneth Ormandy <hello@kennethormandy.com>
Date:   Fri Mar 8 12:46:58 2024 -0800

    Adds batch query when querying regular sendout recipients

commit 11cfb80
Author: Kenneth Ormandy <hello@kennethormandy.com>
Date:   Fri Mar 8 12:44:26 2024 -0800

    Adds faster calculation of expected recipients for regular sendouts
bencroker added a commit that referenced this pull request Mar 9, 2024
commit eb6e2a3
Author: bencroker <ben@putyourlightson.com>
Date:   Sat Mar 9 10:24:17 2024 -0600

    Deprecate methods

commit 681276f
Author: bencroker <ben@putyourlightson.com>
Date:   Sat Mar 9 10:13:10 2024 -0600

    Fix SendoutBatcher implementation, curly quotes

commit afdd7b4
Author: bencroker <ben@putyourlightson.com>
Date:   Sat Mar 9 09:08:29 2024 -0600

    Revert method removal

commit 372ce05
Author: bencroker <ben@putyourlightson.com>
Date:   Sat Mar 9 08:57:58 2024 -0600

    Refactor to SendoutBatcher

commit 8b791ce
Author: bencroker <ben@putyourlightson.com>
Date:   Sat Mar 9 08:54:59 2024 -0600

    Adds faster calculation of expected recipients

    commit d641372
    Author: bencroker <ben@putyourlightson.com>
    Date:   Fri Mar 8 20:24:19 2024 -0600

        Revert the fix, back to square 1

    commit cffeae2
    Merge: 6a3f170 b58bda0
    Author: Ben Croker <57572400+bencroker@users.noreply.github.com>
    Date:   Fri Mar 8 19:42:20 2024 -0600

        Merge pull request #456 from kennethormandy/contacts-batch-query

        Updates contacts query for large lists

    commit 6a3f170
    Author: bencroker <ben@putyourlightson.com>
    Date:   Fri Mar 8 19:36:05 2024 -0600

        Fix too many parameters

        MySQL acccepts at most 65535 parameters, so it is important to use a `where` clause here.

    commit b58bda0
    Author: Ben Croker <57572400+bencroker@users.noreply.github.com>
    Date:   Fri Mar 8 19:31:31 2024 -0600

        Remove batching, code cleanup

    commit d267fbe
    Author: Ben Croker <57572400+bencroker@users.noreply.github.com>
    Date:   Fri Mar 8 18:54:44 2024 -0600

        Revert changes

    commit 57e808a
    Merge: 4b83e5c f289a4b
    Author: Ben Croker <57572400+bencroker@users.noreply.github.com>
    Date:   Fri Mar 8 18:45:24 2024 -0600

        Merge pull request #455 from kennethormandy/bugfix/missing-preflight-twig-variables

        Fixes missing memory limit and time limit Twig variables

    commit db87912
    Author: Kenneth Ormandy <hello@kennethormandy.com>
    Date:   Fri Mar 8 12:46:58 2024 -0800

        Adds batch query when querying regular sendout recipients

    commit 11cfb80
    Author: Kenneth Ormandy <hello@kennethormandy.com>
    Date:   Fri Mar 8 12:44:26 2024 -0800

        Adds faster calculation of expected recipients for regular sendouts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants