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

[5.5] allow to specify the queue while scheduling of queued jobs #21473

merged 1 commit into from Sep 30, 2017


None yet
2 participants

pavel-mironchik commented Sep 30, 2017

Based on this idea in laravel/internals/issues/457 and inspired by #18235.

Right now you schedule a job to be queued like this:

# /app/Console/Kernel.php

protected function schedule(Schedule $schedule)
    $schedule->job(new UpdatePrices)->hourly();

My simple addition will allow you to specify the queue:

# /app/Console/Kernel.php

protected function schedule(Schedule $schedule)
    $schedule->job(new UpdatePrices, 'update prices')->hourly();

You'll need this to "categorize" jobs or prioritize queues. This code change is fully backward compatible with current release.

@taylorotwell taylorotwell merged commit dc5e12f into laravel:5.5 Sep 30, 2017

2 checks passed

continuous-integration/styleci/pr The StyleCI analysis has passed
continuous-integration/travis-ci/pr The Travis CI build passed

michaeltintiuc added a commit to michaeltintiuc/framework that referenced this pull request Oct 2, 2017

edsamonte added a commit to edsamonte/framework that referenced this pull request Oct 2, 2017

Merge branch 'upstream/5.5' into 5.5
* upstream/5.5: (84 commits)
  Correct docBlock depenency on syncWithoutDetaching (#21478)
  update v5.5 changelog
  allow to specify the queue while scheduling of queued jobs (#21473)
  [5.5] Clear CountQuery "select" bindings since we're overriding the columns anyway (#21468)
  add interface
  access pivot on resource
  update v5.5 changelog
  extract trait
  Fix docblock in Route (#21454)
  fix test
  Fix Relation::morphMap() merge (issue #21457). (#21458)
  extract AnonymousResourceCollection into class to allow serialization
  revert relationship limits
  Fix spelling of 'optionally'
  [5.5] Fix Collection::contains() when the found value is null (#21442)
  Allow passing a callback to "with" (#21445)
  [5.5] Add relation and model attributes in RelationNotFoundException (#21426)
  [5.5] Make sure sql for virtual columns is added after the unsigned modifier (#21441)
  vendor:publish options alphabetized (#21412)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment