diff options
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | README.md | 13 | ||||
| -rw-r--r-- | config/deploy.rb | 7 | ||||
| -rw-r--r-- | config/initializers/devise_async.rb | 1 | 
4 files changed, 20 insertions, 2 deletions
| diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ccc2cbdf..858418628 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@    * Prise en compte d'une barre de progression lorsqu'un import, un export ou une validation est lancé    * Mise en valeur du format des données importées ou exportées    * Affichage d'une synthèse de la validation effectuée par lignes de transport +  * Envoi de mail en asynchrone avec DelayedJob en option  # Version 2.5.3  * Nouvelles fonctionnalités @@ -81,7 +81,7 @@ RAILS_ENV=production bundle exec rake db:create db:migrate  Prepare static resources (assets)  ```sh -RAILS_ENV=production bundle exec rake assets:clean assets:precompile +RAILS_ENV=production bundle exec rake assets:clobber assets:precompile  ```  Configuration @@ -116,10 +116,19 @@ Configure IGN Géoportail Key.  * Edit [secrets.yml](./config/secrets.yml) and uncomment and set```geoportail_api_key```  * see [API Géoportail documentation](http://api.ign.fr/accueil) +Configure the way that it sends email. +* Edit [devise_async.rb](./config/initializer/devise_async.rb) and uncomment and set```Devise::Async.enabled``` ( true if you want to use asynchronously and false otherwise ) +* see [Devise Async specification](https://github.com/mhfs/devise-async)  Run  --- +Launch the task if you want to send mail asynchronously (See previous chapter to desactivate it) +```sh +RAILS_ENV=production bundle exec rake jobs:work +``` +This task may be added in system start up configuration +  Launch rails server with [WEBrick](http://guides.rubyonrails.org/command_line.html#server-with-different-backends) ( default RoR web server, note: running on default port 3000)  ```sh  RAILS_ENV=production bundle exec rails server @@ -152,7 +161,7 @@ API Documentation  The description of the restful API is described in :  * [User manual file](./doc/interfaces/Chouette_API_REST_v1.2.pdf)  * [XSD file](./doc/interfaces/api_rest_v1.xsd) -* [Chouette Web Service IEV](https://github.com/afimb/chouette) +* [Chouette Web Service IEV](https://github.com/afimb/chouette/blob/master/doc/interface/Chouette-API%20serveur%20IEV-1.0.pdf)  License diff --git a/config/deploy.rb b/config/deploy.rb index c69b0dd81..0060749c3 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -24,6 +24,7 @@ after "deploy:update", "deploy:cleanup", "deploy:group_writable"  after "deploy:update_code", "deploy:symlink_shared", "deploy:chouette_command", "deploy:gems"  # ugly workaround for bug https://github.com/capistrano/capistrano/issues/81  before "deploy:assets:precompile", "deploy:symlink_shared" +after "deploy:restart", "delayed_job:restart"  # If you want to use command line options, for example to start multiple workers,  # define a Capistrano variable delayed_job_args: @@ -92,3 +93,9 @@ namespace :deploy do    end  end + +namespace :delayed_job do +  task :restart do +    run "sudo /etc/init.d/chouette2 restart" +  end +end diff --git a/config/initializers/devise_async.rb b/config/initializers/devise_async.rb index 117f76588..e111247ea 100644 --- a/config/initializers/devise_async.rb +++ b/config/initializers/devise_async.rb @@ -1 +1,2 @@  Devise::Async.backend = :delayed_job +Devise::Async.enabled = true # | false | 
