-
Notifications
You must be signed in to change notification settings - Fork 11
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
CV2-5086 Move Smooch NLU to presto #1996
CV2-5086 Move Smooch NLU to presto #1996
Conversation
@caiosba not sure why this last error is happening so may want to discuss but otherwise ready for review! I'm going to hold in draft until later though so we can not have a flood of these at the same time. |
OK! This failure seems to be related to the changes at least. |
Allow lists (core, custom, search results, articles, filtered or not) to be exported to a CSV file that is sent to e-mail. - [x] Add an `exportList` GraphQL mutation - [x] Implement a generic export class that supports media, articles and feeds - [x] Validate maximum number of results (which is a global configuration key) - [x] Validate permission - [x] Create Sidekiq job to export results - [x] Create a CSV for the export - [x] Save CSV in S3 using a pre-signed URL that expires after X days ("X" is a global configuration key) - [x] Add support to MailCatcher - [x] Send CSV by e-mail - [x] Automated tests - [x] Make sure it works for articles as well - [x] Make sure it works for shared feeds as well References: CV2-5067 and CV2-4979.
…086-smooch-nlu-presto
app/lib/smooch_nlu.rb
Outdated
alegre_operation = 'post' | ||
alegre_params = common_alegre_params.merge({ text: keyword, models: ALEGRE_MODELS_AND_THRESHOLDS.keys }) | ||
Bot::Alegre.get_sync_raw_params(alegre_params, "text") if alegre_operation && alegre_params | ||
elsif operation == 'remove' | ||
keywords -= [keyword] | ||
alegre_operation = 'delete' | ||
alegre_params = common_alegre_params.merge({ quiet: true }) | ||
Bot::Alegre.request_delete_from_raw(alegre_params, "text") if alegre_operation && alegre_params |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be simplified further, it seems... you don't need alegre_operation
anymore, since the calls were moved to the condition blocks... right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right! Updated.
Co-authored-by: chinelo-obitube <[email protected]>
…ch. (#2004) Fixes CV2-5127.
Allow lists (core, custom, search results, articles, filtered or not) to be exported to a CSV file that is sent to e-mail. - [x] Add an `exportList` GraphQL mutation - [x] Implement a generic export class that supports media, articles and feeds - [x] Validate maximum number of results (which is a global configuration key) - [x] Validate permission - [x] Create Sidekiq job to export results - [x] Create a CSV for the export - [x] Save CSV in S3 using a pre-signed URL that expires after X days ("X" is a global configuration key) - [x] Add support to MailCatcher - [x] Send CSV by e-mail - [x] Automated tests - [x] Make sure it works for articles as well - [x] Make sure it works for shared feeds as well References: CV2-5067 and CV2-4979.
Co-authored-by: chinelo-obitube <[email protected]>
…ch. (#2004) Fixes CV2-5127.
Co-authored-by: chinelo-obitube <[email protected]>
Description
More work to move some of the lower level Alegre uses over to presto.
References: CV2-5086
How has this been tested?
Not yet tested - changing code first to determine effect of changes then work through necessary changes from there - testing will need to just ensure that articles do in fact get indexed if you send these commands to alegre from check-api
Things to pay attention to during code review
Nothing in particular
Checklist