GithubHelp home page GithubHelp logo

isabella232 / redmine_resque Goto Github PK

View Code? Open in Web Editor NEW

This project forked from restream/redmine_resque

0.0 0.0 0.0 93 KB

Add "resque" gem and mount Resque front-end on a subpath "/resque".

License: Apache License 2.0

Ruby 89.33% Shell 10.67%

redmine_resque's Introduction

Redmine Resque Plugin

Build Status Code Climate

This plugin adds resque and resque-scheduler gems (https://github.com/resque/resque) and mounts the Resque front end on the "/resque" subpath.

The plugin creates a top-menu Redmine link that allows the administrator to see what happens in the job queue.
resque link job queue

Compatibility

This plugin version is compatible only with Redmine 2.1.x and later.

Installation

  1. This plugin requires Redis. Install and run the Redis service before you proceed.

  2. To install the plugin

    • Download the .ZIP archive, extract files and copy the plugin directory into #{REDMINE_ROOT}/plugins.

    Or

    • Change you current directory to your Redmine root directory:

        cd {REDMINE_ROOT}
      

      Copy the plugin from GitHub using the following commands:

        git clone https://github.com/Restream/redmine_resque.git plugins/redmine_resque
      
  3. Install the required gems using the command:

     bundle install
    
    • In case of bundle install errors, remove the Gemfile.lock file, update the local package index and install the required dependencies. Then execute the bundle install command again:

        rm Gemfile.lock
        sudo apt-get update
        sudo apt-get install -y libxml2-dev libxslt-dev libpq-dev
        bundle install
      
  4. Restart Redmine.

  5. Run a Resque worker from the REDMINE_ROOT directory or use an Ubuntu/Debian upstart job:

     bundle exec rake resque:work RAILS_ENV=production QUEUE=*
    
  6. Run a Resque scheduler from the REDMINE_ROOT directory or use an Ubuntu/Debian upstart job:

     bundle exec rake resque:scheduler RAILS_ENV=production
    

Now you should be able to see the plugin in Administration > Plugins.

Scheduling the jobs

  1. Create the worker schedule file in the redmine/config directory:

     nano config/worker_schedule.yml
    
  2. Add the following configuration section to your schedule.

Mail reading

The parameters for this job are exactly the same as the normal Redmine rake task to receive emails with IMAP as described here.

    read_mail:
      cron: "* * * * *"
      class: "ReceiveEmailIMAP"
      queue: "mail"
      args:
      - host: imap.gmail.com
      - port: 993
      - ssl: true
      - username: [email protected]
      - password: some_password
      description: "Read mail sent to Redmine mailbox."

Ubuntu/Debian upstart job

  1. Copy the example upstart configuration files provided by this plugin to the system directory:

     cp script/redmine_*.conf /etc/init
    
  2. Edit the configuration files and scripts to reflect the correct system user and Redmine installation path.

     nano script/redmine_scheduler.sh
     nano script/redmine_worker.sh
     nano /etc/init/redmine_scheduler.conf
     nano /etc/init/redmine_worker.conf
    
  3. Start or stop the scheduler and the worker.

     service redmine_scheduler start
     service redmine_worker start
    
  4. If you want non-root users to be able to stop/start the service, add them to the sudoers file:

     nano /etc/sudoers
     
     # Add these lines:
     your_user ALL=NOPASSWD: /usr/sbin/service redmine_scheduler *
     your_user ALL=NOPASSWD: /usr/sbin/service redmine_worker *
    

Usage

This plugin is used by other Redmine plugins, for example, Redmine Elastic Search Plugin.

Maintainers

Danil Tashkinov, github.com/nodecarter

License

Copyright (c) 2016 Restream

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

redmine_resque's People

Contributors

nodecarter avatar irina-l avatar hsbt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.