This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trigger_ids = %w[ | |
| ] | |
| trigger_ids.each do |id| | |
| trigger = Trigger.find(id) | |
| search_id = trigger.templates.where(template_type: "EmailTemplate").first.id | |
| job = Delayed::Job.where(queue: "delivery_notification_job").where("handler ilike ?", "%#{search_id}%").first | |
| job.update(run_at: Time.now + rand(60..1440).minutes) # 1 hour to 24 hours in the future. | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| THEME = Theme.find("92a77eb4-f904-4b16-badb-131245fa8af6");0 | |
| ids = [] | |
| %w[air premier 2now advance zero generic].each do |product| | |
| %w[created in_transit problem delivered activation].each do |status| | |
| ["adicional"].each do |client_type| | |
| template = THEME.templates.find_by!(name: "#{product} #{status} #{client_type}") | |
| ids << template.id | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| EMAIL = "raul@kublau.com" | |
| WORKSPACE = Workspace.friendly.find("rastreo");0 | |
| THEME = Theme.find("e392f012-b665-4693-a8ea-a6718a68b5af");0 | |
| TRACKER = WORKSPACE.trackers.find_by(tracking_code: "8454737362");0 | |
| TRIGGER = WORKSPACE.triggers.find("e2f9734e-34b1-43f7-a4da-e220da1c74a3") | |
| def update_trigger(template) | |
| params = { | |
| subject: template.name, | |
| selected_theme_template_id: template.id, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| EMAIL = "raul@kublau.com" | |
| WORKSPACE = Workspace.friendly.find("rastreo");0 | |
| TRACKER = WORKSPACE.trackers.find_by(tracking_code: "8454737362");0 | |
| def send_test_notification(trigger) | |
| notification_params = { | |
| trigger_id: trigger.id, | |
| email: EMAIL, | |
| phone: nil, | |
| check_guards: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| THEME = Theme.find("92a77eb4-f904-4b16-badb-131245fa8af6");0 | |
| ActiveRecord::Base.transaction do | |
| THEME.render_theme_templatings.each do |rt| | |
| rt.update_template_body! | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| EMAIL = "pcardenas@3entre3.com" | |
| WORKSPACE = Workspace.friendly.find("rastreo");0 | |
| TRACKER = WORKSPACE.trackers.find_by(tracking_code: "8454737362");0 | |
| def send_test_notification(trigger) | |
| notification_params = { | |
| trigger_id: trigger.id, | |
| email: EMAIL, | |
| phone: nil, | |
| check_guards: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gem "stimulus_reflex", "~> 3.4.1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Definition] | |
| failregex = ^<HOST> -.*GET http.* | |
| ignoreregex = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Definition] | |
| failregex = ^<HOST> -.*GET .*/~.* | |
| ignoreregex = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Definition] | |
| failregex = ^<HOST> -.*GET.*(\.php|\.asp|\.exe|\.pl|\.cgi|\.scgi) | |
| ignoreregex = |
NewerOlder