mirror of
https://github.com/idanoo/php-resque
synced 2025-07-01 05:32:20 +00:00
Merge pull request #226 from andrewbrereton/patch-1
gethostname() doesn't work on Amazon's EC2
This commit is contained in:
commit
3cead7dbb6
1 changed files with 2 additions and 7 deletions
|
@ -71,13 +71,8 @@ class Resque_Worker
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->queues = $queues;
|
$this->queues = $queues;
|
||||||
if(function_exists('gethostname')) {
|
$this->hostname = php_uname('n');
|
||||||
$hostname = gethostname();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$hostname = php_uname('n');
|
|
||||||
}
|
|
||||||
$this->hostname = $hostname;
|
|
||||||
$this->id = $this->hostname . ':'.getmypid() . ':' . implode(',', $this->queues);
|
$this->id = $this->hostname . ':'.getmypid() . ':' . implode(',', $this->queues);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue