Skip to content

Instantly share code, notes, and snippets.

@jverdeyen
Last active February 21, 2018 15:31
Show Gist options
  • Select an option

  • Save jverdeyen/210380146810c1a96c0c64f315b3716f to your computer and use it in GitHub Desktop.

Select an option

Save jverdeyen/210380146810c1a96c0c64f315b3716f to your computer and use it in GitHub Desktop.

Revisions

  1. jverdeyen revised this gist Feb 21, 2018. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion QueueController.php
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,6 @@
    use AppBundle\Service\Queue\QueuedCommandHandler;
    use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
    use Symfony\Bundle\FrameworkBundle\Controller\Controller;
    use Symfony\Component\HttpFoundation\Request;
    use Symfony\Component\HttpFoundation\Response;

    class QueueController extends Controller
  2. jverdeyen revised this gist Feb 14, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion QueueController.php
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,7 @@ class QueueController extends Controller
    */
    public function addCommandsAction(QueuedCommandHandler $handler)
    {
    $command = new QueuedCommand('cache:clear', ['no-warmup']);
    $command = new QueuedCommand('cache:clear', ['--no-warmup']);
    $handler->handle($command);

    return new Response('OK');
  3. jverdeyen created this gist Feb 14, 2018.
    24 changes: 24 additions & 0 deletions QueueController.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    <?php

    namespace AppBundle\Controller;

    use AppBundle\Model\Queue\QueuedCommand;
    use AppBundle\Service\Queue\QueuedCommandHandler;
    use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
    use Symfony\Bundle\FrameworkBundle\Controller\Controller;
    use Symfony\Component\HttpFoundation\Request;
    use Symfony\Component\HttpFoundation\Response;

    class QueueController extends Controller
    {
    /**
    * @Route("/enqueue")
    */
    public function addCommandsAction(QueuedCommandHandler $handler)
    {
    $command = new QueuedCommand('cache:clear', ['no-warmup']);
    $handler->handle($command);

    return new Response('OK');
    }
    }