chrisboulton / php-resque-scheduler

An addon for php-resque that lets you queue jobs for execution some time in the future. Follows resque-scheduler.
MIT License
271 stars 129 forks source link

Feature composer autoload #12

Open danhunsaker opened 11 years ago

danhunsaker commented 11 years ago

Mirrors changes made in PHP-Resque for the same functionality.

lboynton commented 11 years ago

:+1:

stevelacey commented 10 years ago

@chrisboulton this looks pretty good, any reason this hasn't been merged?

@danhunsaker probably want to add this to the composer json to get the bin installed in vendor/bin:

    "bin": [
        "bin/resque-scheduler"
    ],
chamindaindika commented 6 years ago

@chrisboulton @danhunsaker @stevelacey ,

Will not this been merged with the repository? I think I'm struggling with an issue related to autoloading or something.

I'm using php-resque as the job queue in my project. And the composer package version of the repository is "dev-master". Because of that, I had to move to the dev-master of this resque-scheduler as well.

When I run the command to start the scheduler' worker, it's again start the queue worker in the first place and after I exit from the stdout, then it starts scheduler worker. Because of that, I can't automate the initialization of the scheduler. Below is the command I ran to start the service.

VVERBOSE=1 QUEUE='*' REDIS_BACKEND=$REDIS_HOST:$REDIS_PORT REDIS_BACKEND_DB=$REDIS_DATABASE INTERVAL=10 RESQUE_PHP=vendor/bin/resque php vendor/chrisboulton/php-resque-scheduler/resque-scheduler.php

I'm not sure about the place where the RESQUE_PHP is set. If it's not correct please let me know the correct way of starting the service. And also I feels that if we have the scheduler worker also as a vendor binary with the other changes (such as autoloading) of this pull request, then we can omit the setting of this environment variable in the command. Please correct me if am wrong.