Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forking Launcher #1138

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Commits on Apr 4, 2021

  1. Adds support for running as a forking process in the foreground

    Reason: The `script/delayed_job` process (described above) uses the
    [Daemons](https://github.com/thuehlinger/daemons) gem which has several
    undesirable behaviors when running inside a container (Docker, etc.):
    - The parent process spawns a background child process then exits immediately,
    which causes the container to shutdown.
    - The worker processes are detached from the parent, which prevents logging to `STDOUT`.
    
    The `--fork` option solves this by running workers in a foreground process tree.
    When using `--fork` the `daemons` gem is not required.
    
    The command script requires changing the following line to enable this:
    
    # always daemonizes, never forks
    Delayed::Command.new(ARGV).daemonize
    
    must now be:
    
    # daemonize by default unless --fork specified
    Delayed::Command.new(ARGV).launch
    
    In addition, there are several quality of life improvements added to the Command script:
    - Command: Add --pools arg as an alias for --pool, and allow pipe-delimited pool definitions
    - Command: Add --num-worker arg as an alias for -n / --number-of-workers (and deprecate --number-of-workers)
    - Command: Pool parsing code has been extracted to PoolParser class
    - Command: Add -v / --verbose switch which sets quiet=false on workers
    - Command: Add -x switch as alias for --exit-on-complete
    - Command: Add STDERR warning num-workers less than 1
    - Command: Add STDERR warning if num-workers and pools both specified (pools overrides num-workers as per existing behavior)
    - Command: Add STDERR warning if queues and pools both specified (pools overrides num-workers as per existing behavior)
    
    The Rake script has also been enhanced:
    - Rake: Uses Forking launcher under the hood
    - Rake: Add support for NUM_WORKERS and POOLS args
    johnnyshields committed Apr 4, 2021
    Configuration menu
    Copy the full SHA
    54eba86 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3401c24 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2021

  1. Configuration menu
    Copy the full SHA
    d328cb8 View commit details
    Browse the repository at this point in the history
  2. Fix rake tasks

    johnnyshields committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    dd0db79 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    40d9f04 View commit details
    Browse the repository at this point in the history
  4. - Add tests for Rake tasks

    - Add validation of min vs. max priority
    johnnyshields committed Apr 5, 2021
    Configuration menu
    Copy the full SHA
    0a7145f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9d0d3fe View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    246936c View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2021

  1. Configuration menu
    Copy the full SHA
    ea83992 View commit details
    Browse the repository at this point in the history
  2. Improve log message

    johnnyshields committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    2c87350 View commit details
    Browse the repository at this point in the history
  3. Fix CI

    johnnyshields committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    853efa9 View commit details
    Browse the repository at this point in the history
  4. Try again

    johnnyshields committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    ed855a4 View commit details
    Browse the repository at this point in the history
  5. Fix spec

    johnnyshields committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    226d6d8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7f284da View commit details
    Browse the repository at this point in the history
  7. Fix spec

    johnnyshields committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    6f225da View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a17c488 View commit details
    Browse the repository at this point in the history
  9. Fix rubocop

    johnnyshields committed Apr 6, 2021
    Configuration menu
    Copy the full SHA
    0d06a33 View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2021

  1. Configuration menu
    Copy the full SHA
    293522b View commit details
    Browse the repository at this point in the history
  2. Fix bug

    johnnyshields committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    60ccd9a View commit details
    Browse the repository at this point in the history
  3. Cleanup logging

    johnnyshields committed Apr 7, 2021
    Configuration menu
    Copy the full SHA
    6ab0d17 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2022

  1. Configuration menu
    Copy the full SHA
    dfa5561 View commit details
    Browse the repository at this point in the history