Skip to content
This repository has been archived by the owner on Jan 4, 2018. It is now read-only.

Commit

Permalink
- Fixed build issue with 5.1.x
Browse files Browse the repository at this point in the history
Merged eday changes
    - Added wait functions, uncommented other worker functions.
    - Added timeout functions.
    - Updated function list from C library and removed free methods 
      (should use unset).
    - Added stubs for new functions, fixed tests, fixed some of the 
      existing functions from changes.
  • Loading branch information
jluedke committed Oct 1, 2009
1 parent 71e8359 commit 2a12523
Show file tree
Hide file tree
Showing 7 changed files with 1,315 additions and 1,234 deletions.
4 changes: 2 additions & 2 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ if test "$PHP_GEARMAN" != "no"; then
AC_MSG_ERROR([Please install libgearman])
fi

PHP_CHECK_LIBRARY(gearman, gearman_create,
PHP_CHECK_LIBRARY(gearman, gearman_client_set_context,
[
PHP_ADD_LIBRARY_WITH_PATH(gearman, $GEARMAN_LIB_DIR, GEARMAN_SHARED_LIBADD)
AC_DEFINE(HAVE_GEARMAN, 1, [Whether you have gearman])
],[
AC_MSG_ERROR([wrong libgearman version or lib not found])
AC_MSG_ERROR([libgearman version 0.10 or later required])
],[
-L$GEARMAN_LIB_DIR -R$GEARMAN_LIB_DIR
])
Expand Down
6 changes: 3 additions & 3 deletions const_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ awk 'BEGIN { p= 1; } \

grep ' GEARMAN' $header | \
sed 's/.*\(GEARMAN[A-Z0-9_]*\).*/\1/' | \
sed 's/\(.*\)/ REGISTER_LONG_CONSTANT("\1",\
\1,\
CONST_CS | CONST_PERSISTENT);/' | \
sed 's/\(.*\)/ REGISTER_LONG_CONSTANT("\1",\
\1,\
CONST_CS | CONST_PERSISTENT);/' | \
sed 's/LONG\(.*GEARMAN_DEFAULT_TCP_HOST\)/STRING\1/' | \
sed 's/LONG\(.*GEARMAN_DEFAULT_UDS\)/STRING\1/' | \
sed 's/LONG\(.*GEARMAN_DEFAULT_USER\)/STRING\1/' >> php_gearman.c.new
Expand Down
4 changes: 2 additions & 2 deletions examples/image_thumbnail_worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ function resize_image($job, $args)
$wrk= $job->workload();
$data= unserialize($wrk);
if (! $data['src'] || ! $data['dest'] || ! $data['x'])
{ $job->fail(); print_r($data); return; }
{ $job->sendFail(); print_r($data); return; }
echo $job->handle() . " - creating: $data[dest] x:$data[x] y:$data[y]\n";
$im= new Imagick();
$im->readimage($data['src']);
$im->thumbnailImage($data['x'], $data['y']);
$im->writeImage($data['dest']);
$im->destroy();
$job->status(1, 1);
$job->sendStatus(1, 1);

return $data['dest'];
}
Expand Down
2 changes: 1 addition & 1 deletion examples/reverse_worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function reverse_fn($job)
{
echo "Sending status: $x/$workload_size complete\n";
/*
$job->status($x, $workload_size);
$job->sendStatus($x, $workload_size);
sleep(1);
*/
}
Expand Down
Loading

0 comments on commit 2a12523

Please sign in to comment.