diff --git a/roles/easyredmine/files/ebrc_tasks.rake b/roles/easyredmine/files/ebrc_tasks.rake new file mode 100644 index 0000000..c780e7f --- /dev/null +++ b/roles/easyredmine/files/ebrc_tasks.rake @@ -0,0 +1,10 @@ +namespace :eupathdb do + + desc 'Fetch changesets from the repositories. Same as redmine:fetch_changesets but with added timeout' + task :fetch_changesets => :environment do + Timeout.timeout(120) do + Repository.fetch_changesets + end + end + +end diff --git a/roles/easyredmine/tasks/redmine.yml b/roles/easyredmine/tasks/redmine.yml index 26219d3..fbc0775 100644 --- a/roles/easyredmine/tasks/redmine.yml +++ b/roles/easyredmine/tasks/redmine.yml @@ -69,6 +69,12 @@ owner='{{ redmine_owner }}' become: yes +- name: install ebrc_tasks.rake + copy: dest='{{ redmine_root_dir }}/lib/tasks/ebrc_tasks.rake' + src='ebrc_tasks.rake' + owner='{{ redmine_owner }}' + become: yes + - name: install additional_environment.rb copy: dest='{{ redmine_root_dir }}/config/additional_environment.rb' src='additional_environment.rb' diff --git a/roles/easyredmine/templates/redmine_fetch_changesets.j2 b/roles/easyredmine/templates/redmine_fetch_changesets.j2 index 02f7dc3..d776a6e 100755 --- a/roles/easyredmine/templates/redmine_fetch_changesets.j2 +++ b/roles/easyredmine/templates/redmine_fetch_changesets.j2 @@ -5,5 +5,5 @@ cd {{ redmine_root_dir }} /usr/local/bin/bundle exec rake \ - redmine:fetch_changesets \ + eupathdb:fetch_changesets \ RAILS_ENV="production"