Commit Graph

51 Commits

Author SHA1 Message Date
Daniel Mason
4e87677517 - Updated README to include supervisor configuration.
- Change logfile date format to `%Y-%m-%d %T`.
- Added return types to more functions.
2018-07-16 09:59:58 +12:00
Daniel Mason
493d6dc6d8 Added 48 hour TTL to worker:xxx:started keys to prevent db pollution 2018-05-30 08:25:02 +12:00
Daniel Mason
0d0c0d0a7e - Updated travis builds to run on PHP 7.0, 7.1 and 7.2.
- Added ability to specify multiple log levels. [DEBUG/INFO/NOTICE/WARNING/ERROR/CRITICAL/ALERT/EMERGENCY]
- Default  is now .
- Removed VERBOSE / VVERBOSE flags.
- Enabled date/time logging by default.
2018-05-29 22:20:56 +12:00
Daniel Mason
51fda513f4 Global reformat 2018-05-25 21:03:48 +12:00
Daniel Mason
44413588f4 basic redis tests passing 2018-05-25 20:11:17 +12:00
Daniel Mason
ae84530132 - Reformatted files to PSR2 standard
- Removed credis for native phpredis
- Tidied up some docs
- Setting up new travis.ci build
2018-05-25 19:26:54 +12:00
Chris Boulton
3cead7dbb6 Merge pull request #226 from andrewbrereton/patch-1
gethostname() doesn't work on Amazon's EC2
2016-10-11 12:11:19 -07:00
Chris Boulton
08de86a41e Merge pull request #197 from epicwhale/patch-1
More verbose logging if a Job throws an exception
2016-08-15 18:42:37 -07:00
Ruud Kamphuis
91caca7921 Move declare(ticks = 1) to top 2016-08-03 20:40:30 +02:00
Ruud Kamphuis
16f88a6a38 Move declare(ticks = 1) to startup
Having declare(ticks = 1) inside registerSigHandlers() worked perfectly on PHP 5.6 but it doesn't on PHP 7.

I found it that moving the declare(ticks = 1) outside registerSigHandlers() solves the issue.
2016-08-03 17:07:52 +02:00
Luis Hdez
70102f1b89 Add control for OS X and cli_set_process_title 2016-03-30 03:15:01 +02:00
Luis Hdez
e4cfc541c9 Fix CS whitespaces 2016-03-30 03:14:15 +02:00
Bjoern Boschman
b3b1d408e5 removed all closing PHP tags 2016-03-08 12:19:05 +01:00
Andrew Brereton
7101a3097f gethostname() doesn't work on Amazon's EC2 2014-12-18 17:27:18 +11:00
Dayson Pais
2c8b215cda Implicitly type cast exception while logging.
Removed the unnecessary (string) type-casting.
2014-11-08 15:11:20 +05:30
Dayson Pais
760e38c0ef Fixed syntax error 2014-05-26 22:01:49 +05:30
Dayson Pais
b242280ecd Removed erroneously introduced character. 2014-05-26 21:53:28 +05:30
Dayson Pais
65288538e3 More verbose logging if a Job throws an exception
Presently, the logger just logs the primary error message with no stack trace of additional debugging information. Type casting the exception to a string gives a much efficient output  and enables better debugging.
2014-05-26 17:16:19 +05:30
Ruud Kamphuis
aeabb5bb20 Constructor on top with default logger 2013-12-20 12:24:24 +01:00
Ruud Kamphuis
cdc5c3f357 Set Resque_Log in constructor 2013-12-20 12:21:52 +01:00
Chris Boulton
b3c93367e8 Merge pull request #127 from ptrofimov/bug/establishConnection
Resque/Worker: removed reestablishConnection
2013-09-06 18:04:18 -07:00
Richard K Miller
9335ef51b4 fix spaces that should be tabs 2013-09-04 16:12:12 -06:00
Richard K Miller
6ed8fc048f refactor process title to keep it DRY 2013-09-04 12:29:38 -06:00
Richard K Miller
62dfa93458 cli_set_process_title() available in PHP 5.5 to set proc title. This is preferred over the PECL function setproctitle(). 2013-09-04 10:30:35 -06:00
Petr Trofimov
10c1d0b75e Resque/Worker: removed reestablishConnection 2013-08-23 12:17:47 +03:00
Trent Petersen
25a804d93d Convert indentation in the Worker class.... to . . . . tabs
This was painful for me as a PSR 1-2 follower
2013-07-10 10:07:19 -05:00
Rockstar04
726e58a297 Added basic logging class for a fallback
Corrected unit tests for new code

Add partial unit coverage for logging class

Add newline to logTest file
2013-06-25 12:01:50 -07:00
Ruud Kamphuis
f379d3a36d Fixed unit test 2013-05-29 09:17:06 +02:00
Ruud Kamphuis
86ae77811d Working blocking list pop :) 2013-05-29 09:17:06 +02:00
Ruud Kamphuis
b8f98eecd2 WIP 2013-05-29 09:14:18 +02:00
Ruud Kamphuis
4d5552867a Basic support for blocking list pop 2013-05-29 09:14:17 +02:00
Corey Ballou
3b4c46e039 Fixed the Resque_Worker log method to properly handle NORMAL vs VERBOSE logging. 2013-02-21 07:37:16 -05:00
Chris Boulton
6800fbe5ac fix compatibility with phpredis
* implement a fork helper method that closes the connection to redis before forking (instead of resetting after)
  to work around bugs with phpredis/socket fork handling
* phpredis does not automatically typecast to string, so worker name must be typecasted when registering
2013-01-13 02:59:06 +11:00
Chris Boulton
2f5b48930f make better use of composer across php-resque
* recommend php-resque be installed via Composer
* provide quick getting started steps
* move ./resque.php to bin/resque, make it available as a Composer bin
* have classes autoloaded via Composer (or some other means if not using Composer)
2013-01-12 22:40:26 +11:00
Chris Boulton
c908109a74 Remove silly copyright line in docblock comments, update email address, remove copyright year because it is boring to maintain 2012-10-13 17:55:41 +11:00
Chaitanya Kuber
cc871c06ab fixed spelling error and removed debug code 2012-03-15 20:03:34 -05:00
Chaitanya Kuber
48a7febd88 Merge branch 'master' of https://github.com/chrisboulton/php-resque 2012-03-06 22:48:01 -06:00
Chaitanya Kuber
3b59fa5dbc method comment changes 2012-03-01 19:21:58 -06:00
Salimane Adjao Moustapha
5b24b471dc avoid working with dirty worker ids 2012-02-02 16:06:00 +08:00
Chris Boulton
3514a4f063 Move brace to new line 2011-09-24 15:40:20 +10:00
d11wtq
c90e21d88e Fix a bug where the worker would spin out of control taking the server with it, if the redis connection was interrupted even briefly. Use SIGPIPE to trap this scenario cleanly. 2011-09-24 15:08:53 +10:00
chris.boulton
3245c523c7 Add ability to fetch wildcarded list of queues a worker belongs to without it expanding them out using redis 2011-03-27 19:17:35 +11:00
chris.boulton
6f43fcfed8 Add a plugin/event/hook system 2011-03-27 18:42:46 +11:00
chris.boulton
25fac9a16a Fix undefined variable $child on non-forking operating systems 2011-03-27 16:01:56 +11:00
KevBurnsJr
5fb34c3a90 Trimming output of ps -A to remove prepended whitespace. 2010-11-08 10:49:30 -08:00
KevBurnsJr
cff5d779b4 Adding support for intervals of less than 1 second. 2010-11-07 14:59:32 -08:00
Chris Boulton
9ce7cfb370 Change all require statements to include the full path. 2010-04-20 10:59:06 +10:00
Chris Boulton
94fed1cfb4 Don't return from pruneDeadWorkers if there are no worker pids 2010-04-19 15:44:46 +10:00
Chris Boulton
5ac7e90374 Fix cannot break/continue error when pruning dead workers and none are found. continue should have been return 2010-04-19 14:57:14 +10:00
Chris Boulton
c5396f4e86 Change arguments for jobs to an array instead of an object. Also change other json encoded items to decode to an array rather than objects 2010-04-19 10:35:50 +10:00