Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Queue package
  • Dear all,

    I just released my first package for FuelPHP 1.7. It is a queuing system created to run jobs asynchronously. 

    A small subset of it's features:

    - Simple usage, easy to integrate in your project.
    - Different queues in parallel that can be switched on and off.
    - Executed any static function, with arguments.
    - Set priorities for the job.
    - Delayed execution.
    - Detailed error messages.
    - Status panel showing all the jobs.

    Bitbucket link (for issue tracking): https://bitbucket.org/codeyellow/queue
    Additional relase notes: http://www.codeyellow.nl/queue.html
  • Cool.

    One question though, instructions say:

    Make a new file in fuel/app/tasks with the name queue.php on your application with the follow code:


    <?php
    \Package::load('queue');
    include_once PKGPATH . 'queue/tasks/queue.php';
    Why is this code not the task itself? So you don't need this imho clumsy workaround?
  • You can just copy paste the source from the tasks/queue.php file. But that is more work.

    Is it possible to run a task directly from a vendor?
  • It was a package, wasn't it? So there is no relation with the "vendor" folder.
  • When installing from composer, it installs in the vendor direcotry. Is that wrong?
  • No, but you referred to it previously as a package, hence my remarks. So it's not a package?
  • Thank you for clarifying that. How should it be called then?
  • I don't know. ;)

    We usually refer to composer packages as libraries (also in Fuel v2 which is composer driven), to avoid confusion between the two.

    On Bitbucket, you give the instructions to create a task, and in that task, put this code:
    <?php
    \Package::load('queue');
    include_once PKGPATH . 'queue/tasks/queue.php';
    which indicates it is a Fuel package, otherwise you don't need this code?

    But if you just install it through composer, it will be in the vendor folder, not in PKGPATH, and Package::load() will not work?

    So for me it's very confusing what you are trying to do here...
  • If you state it like that, it is indeed weird. This bit was based on some legacy code.

    I will have a look at it when I am back at my work again (This saturday) 
  • Thank you all for the replies. I have checked it, and it was indeed an error in the readme file.

    It is changed now! I'm sorry for the confusion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion