Skip to content
Snippets Groups Projects
Commit a4e819f7 authored by Richard Fernando Heise Ferreira's avatar Richard Fernando Heise Ferreira
Browse files

Merge branch 'issue/49-add-restart_streaks-to-schedule' into 'develop'

Issue/49 add restart streaks to schedule

See merge request rfhf19/cleanning-portalmec!46
parents bfc9f3f0 db8d25bb
No related branches found
No related tags found
1 merge request!46Issue/49 add restart streaks to schedule
Pipeline #34402 failed
...@@ -11,6 +11,7 @@ gem 'sdoc', '>= 0.4.0', group: :doc ...@@ -11,6 +11,7 @@ gem 'sdoc', '>= 0.4.0', group: :doc
# Use ActiveModel has_secure_password # Use ActiveModel has_secure_password
gem 'bcrypt', '>= 3.1.7' gem 'bcrypt', '>= 3.1.7'
# memcached # memcached
gem 'dalli' gem 'dalli'
...@@ -181,4 +182,7 @@ gem 'faraday-net_http_persistent', '~> 2.0' ...@@ -181,4 +182,7 @@ gem 'faraday-net_http_persistent', '~> 2.0'
gem 'elasticsearch', '~> 8.6' gem 'elasticsearch', '~> 8.6'
gem 'multipart-post', '~> 2.0'
gem 'faraday-multipart', '~> 1.0', '>= 1.0.4'
...@@ -30,4 +30,6 @@ class V1::UserProgressesController < ApplicationController ...@@ -30,4 +30,6 @@ class V1::UserProgressesController < ApplicationController
render json: all_progresses_paginate render json: all_progresses_paginate
end end
end end
class UserMailer < ActionMailer::Base class UserMailer < ActionMailer::Base
#set the default email sender #set the default email sender
default from: 'portalmec_tec@inf.ufpr.br' default from: 'integrada.contato@mec.gov.br'
#function to send email to user when he/she is created through the admin panel #function to send email to user when he/she is created through the admin panel
def welcome_email (user) def welcome_email (user)
...@@ -17,7 +17,7 @@ class UserMailer < ActionMailer::Base ...@@ -17,7 +17,7 @@ class UserMailer < ActionMailer::Base
def users_email_sender (email, subject, body) def users_email_sender (email, subject, body)
@body = body @body = body
mail(to: email, subject: subject) mail(from: "integrada.contato@mec.gov.br", to: email, subject: subject)
end end
end end
...@@ -70,4 +70,4 @@ class View < ApplicationRecord ...@@ -70,4 +70,4 @@ class View < ApplicationRecord
user.complete_action(Action.find_by_name("Visualizar uma Coleção")) if viewable_type == "Collection" user.complete_action(Action.find_by_name("Visualizar uma Coleção")) if viewable_type == "Collection"
end end
end end
end end
\ No newline at end of file
...@@ -91,6 +91,7 @@ module Portalmec ...@@ -91,6 +91,7 @@ module Portalmec
# api mode # api mode
config.api_only = true config.api_only = true
#TODO fix ugly code when omniauth is fixed #TODO fix ugly code when omniauth is fixed
# Only loads a smaller set of middleware suitable for API only apps. # Only loads a smaller set of middleware suitable for API only apps.
......
...@@ -7,7 +7,7 @@ development: ...@@ -7,7 +7,7 @@ development:
encoding: unicode encoding: unicode
database: portalmecapi database: portalmecapi
username: postgres username: postgres
password: luanmatheus password: 123mudar
host: localhost host: localhost
test: test:
...@@ -15,7 +15,7 @@ test: ...@@ -15,7 +15,7 @@ test:
encoding: unicode encoding: unicode
database: portalmecapi database: portalmecapi
username: postgres username: postgres
password: luanmatheus password: 123mudar
host: localhost host: localhost
production: production:
......
...@@ -38,7 +38,8 @@ export PORTALMEC_DSPACE_HOST=mecdb4.c3sl.ufpr.br ...@@ -38,7 +38,8 @@ export PORTALMEC_DSPACE_HOST=mecdb4.c3sl.ufpr.br
export PORTALMEC_ELASTICSEARCH_LOGIN=elastic export PORTALMEC_ELASTICSEARCH_LOGIN=elastic
export PORTALMEC_ELASTICSEARCH_PASSWORD=123mudar export PORTALMEC_ELASTICSEARCH_PASSWORD=123mudar
export PORTALMEC_ELASTICSEARCH_PORT=9200 export PORTALMEC_ELASTICSEARCH_PORT=9200
export PORTALMEC_ELASTICSEARCH_HOST=localhost #export PORTALMEC_ELASTICSEARCH_HOST=localhost
export PORTALMEC_ELASTICSEARCH_HOST=elasticsearchupgrade
#export PORTALMEC_ELASTICSEARCH_HOST=elasticsearchprod #export PORTALMEC_ELASTICSEARCH_HOST=elasticsearchprod
### Cache ### Cache
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
Rails.application.routes.draw do Rails.application.routes.draw do
# require 'sidekiq/web' require 'sidekiq/web'
# mount Sidekiq::Web, at: '/sidekiq' mount Sidekiq::Web, at: '/sidekiq'
concern :deletable do concern :deletable do
collection do collection do
......
...@@ -56,3 +56,7 @@ end ...@@ -56,3 +56,7 @@ end
every 5.days do every 5.days do
rake 'delete_production_log:delete_log' rake 'delete_production_log:delete_log'
end end
every 1.days, at: '12am' do
rake 'user:restart_streaks'
end
\ No newline at end of file
...@@ -7,8 +7,10 @@ PORTALMEC_DSPACE_LOGIN=admin@mecdb3.c3sl.ufpr.br ...@@ -7,8 +7,10 @@ PORTALMEC_DSPACE_LOGIN=admin@mecdb3.c3sl.ufpr.br
PORTALMEC_DSPACE_PASSWORD=admin PORTALMEC_DSPACE_PASSWORD=admin
PORTALMEC_DSPACE_PORT=8443 PORTALMEC_DSPACE_PORT=8443
PORTALMEC_DSPACE_HOST=mecdb4.c3sl.ufpr.br PORTALMEC_DSPACE_HOST=mecdb4.c3sl.ufpr.br
PORTALMEC_ELASTICSEARCH_LOGIN=elastic
PORTALMEC_ELASTICSEARCH_PASSWORD=123mudar
PORTALMEC_ELASTICSEARCH_PORT=9200 PORTALMEC_ELASTICSEARCH_PORT=9200
PORTALMEC_ELASTICSEARCH_HOST=localhost PORTALMEC_ELASTICSEARCH_HOST=elasticsearchupgrade
MEMCACHE_SERVERS=localhost MEMCACHE_SERVERS=localhost
ACTION_MAILER_HOST=api.portalmectest.c3sl.ufpr.br ACTION_MAILER_HOST=api.portalmectest.c3sl.ufpr.br
SMTP_ADDRESS=urquell.c3sl.ufpr.br SMTP_ADDRESS=urquell.c3sl.ufpr.br
......
...@@ -5,4 +5,4 @@ namespace :email_users do ...@@ -5,4 +5,4 @@ namespace :email_users do
UserMailer.users_email_sender(@user).deliver_now UserMailer.users_email_sender(@user).deliver_now
end end
end end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment