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

feat(poc): Disable widget based on country #6658

Merged
merged 3 commits into from
Mar 14, 2023

Conversation

pranavrajs
Copy link
Member

@pranavrajs pranavrajs commented Mar 14, 2023

  • Disable widget based on country code from IP address

https://www.loom.com/share/f2363462485b4aa8a6826f77a8964bf7

Changes:

The database download has been moved to a rake task and will be downloaded during boot up. Dynamically fetching (async fetches via Sidekiq) the database does not work well with synchronous calls since each server requires a copy of the file.

I updated the Procfile to download the DB initially and then run the service afterwards. This change may increase the bootup time by 3-4 seconds, depending on network latency.

I removed the IP_LOOKUP_SERVICE variable because none of the other services will work without the lookup parameter. Therefore, managing this variable is pointless.

@pr-triage pr-triage bot added the PR: unreviewed This pull request is yet to be reviewed. label Mar 14, 2023
@netlify
Copy link

netlify bot commented Mar 14, 2023

Deploy Preview for chatwoot-storybook canceled.

Name Link
🔨 Latest commit 338308d
🔍 Latest deploy log https://app.netlify.com/sites/chatwoot-storybook/deploys/640ffc28f524420007f224de

@pranavrajs pranavrajs temporarily deployed to staging-chatwoot March 14, 2023 03:18 Inactive
@pranavrajs pranavrajs temporarily deployed to staging-chatwoot March 14, 2023 04:47 Inactive
Copy link
Contributor

@tejaswinichile tejaswinichile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏼

@pr-triage pr-triage bot added PR: partially-approved Not all reviewers have approved the PR and removed PR: unreviewed This pull request is yet to be reviewed. labels Mar 14, 2023
Copy link
Member

@sojan-official sojan-official left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +2 to +3
web: bundle exec rails ip_lookup:setup && bin/rails server -p $PORT -e $RAILS_ENV
worker: bundle exec rails ip_lookup:setup && bundle exec sidekiq -C config/sidekiq.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could trigger this from the initializer. It would ensure that it stays consistent across all installation environments with out updating the documentation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sojan-official Can you please make the change if it is a small one?

@pr-triage pr-triage bot added PR: reviewed-approved All reviewers have approved the PR and removed PR: partially-approved Not all reviewers have approved the PR labels Mar 14, 2023
@pranavrajs pranavrajs merged commit eb7070d into develop Mar 14, 2023
@pranavrajs pranavrajs deleted the feat-poc/disable-widget-based-on-country-code branch March 14, 2023 16:10
@pr-triage pr-triage bot added PR: merged The pull request is merged to another branch and removed PR: reviewed-approved All reviewers have approved the PR labels Mar 14, 2023
rutvijmehta-harness pushed a commit to rutvijmehta-harness/chatwoot that referenced this pull request Mar 20, 2023
rutvijmehta-harness added a commit to rutvijmehta-harness/chatwoot that referenced this pull request Mar 20, 2023
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
rutvijmehta-harness pushed a commit to rutvijmehta-harness/chatwoot that referenced this pull request Mar 27, 2023
rutvijmehta-harness added a commit to rutvijmehta-harness/chatwoot that referenced this pull request Mar 27, 2023
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR: merged The pull request is merged to another branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants