You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This update adds a new JobQueue class which is powered by Pheanstalk/Beanstalkd. This makes it very easy to setup background workers and send tasks to them for processing.
Setup
To set it up, install Beanstalkd via your package manager of choice (apt/yum/brew/port), for example:
$ apt install beanstalkd
Next, after upgrading Elefant to 2.2.4, run Composer update from the root directory of your website to install the Pheanstalk library:
$ cd /path/to/www && composer update
Lastly, edit the [JobQueue] settings in your conf/config.php file to point to your Beanstalkd server:
[JobQueue]backend = beanstalkd
host = 127.0.0.1
port = 11300
Usage
Sending a job to be done by a background worker is as easy as:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Elefant 2.2.4 has been released with a number of bug fixes and improvements.
Click here to download or update.
Introducing JobQueue
This update adds a new JobQueue class which is powered by Pheanstalk/Beanstalkd. This makes it very easy to setup background workers and send tasks to them for processing.
Setup
To set it up, install Beanstalkd via your package manager of choice (apt/yum/brew/port), for example:
Next, after upgrading Elefant to 2.2.4, run Composer update from the root directory of your website to install the Pheanstalk library:
Lastly, edit the
[JobQueue]
settings in yourconf/config.php
file to point to your Beanstalkd server:Usage
Sending a job to be done by a background worker is as easy as:
Writing a worker in Elefant looks like this:
The above worker can be run via
php index.php myapp/worker
and can be initialized using your system scheduler, such as systemd.Other improvements
User::require_verification()
which extendsUser::require_login()
to require email verification tooAuto-include Composer autoloader
to Site Settings form so you no longer need to include it manually in abootstrap.php
fileClick here for a full list of changes.
Beta Was this translation helpful? Give feedback.
All reactions