Hide celery user

This commit is contained in:
Duncan Sommerville 2015-09-15 13:59:48 -04:00
parent 8c65ba8f66
commit dd09676f88
3 changed files with 3 additions and 3 deletions

View File

@ -77,8 +77,7 @@ class CeleryService {
$c = self::_setupCeleryExchange($config, self::$_CELERY_RESULTS_EXCHANGE, $queue);
$message = $c->getAsyncResultMessage($task->getDbName(), $task->getDbTaskId());
// If the message isn't ready yet (Celery hasn't finished the task),
// only throw an exception if the message has timed out.
// If the message isn't ready yet (Celery hasn't finished the task), throw an exception.
if ($message == FALSE) {
if (self::_checkMessageTimeout($task)) {
// If the task times out, mark it as failed. We don't want to remove the

View File

@ -19,6 +19,7 @@ class SoundcloudService extends ThirdPartyCeleryService implements OAuth2 {
*/
protected static $_SERVICE_NAME = SOUNDCLOUD_SERVICE_NAME; // SoundCloud service name constant from constants.php
// TODO: Make these constants
/**
* @var string exchange name for SoundCloud tasks
*/

View File

@ -35,7 +35,7 @@ def postinst():
os.chmod('/var/log/airtime', 0775)
# Create the Celery user
call(['adduser', '--no-create-home', '--home', '/var/lib/celery', '--gecos', '', '--disabled-login', 'celery'])
call(['adduser', '--no-create-home', '--gecos', '', '--disabled-login', '--firstuid', '1', '--lastuid', '999', 'celery'])
# Add celery to the www-data group
call(['usermod', '-G', 'www-data', '-a', 'celery'])