Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Better broker mgmt inside entrypoints #2491

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docker/entrypoints/celery_default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ else
worker_number=8
fi

ARGUMENTS="-A intel_owl.celery worker -n worker_default --uid www-data --gid www-data --time-limit=10000 --pidfile= -c $worker_number -Ofair -Q default,broadcast,config -E --without-gossip"

if [ "$AWS_SQS" = "True" ]
then
queues="default.fifo,config.fifo"
else
queues="default,broadcast,config"
fi


ARGUMENTS="-A intel_owl.celery worker -n worker_default --uid www-data --gid www-data --time-limit=10000 --pidfile= -c $worker_number -Ofair -Q ${queues} -E --without-gossip"
if [[ $DEBUG == "True" ]] && [[ $DJANGO_TEST_SERVER == "True" ]];
then
echo "Running celery with autoreload"
Expand Down
10 changes: 9 additions & 1 deletion docker/entrypoints/celery_ingestor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ until cd /opt/deploy/intel_owl
do
echo "Waiting for server volume..."
done
ARGUMENTS="-A intel_owl.celery worker -n worker_ingestor --uid www-data --gid www-data --time-limit=40000 --pidfile= -Ofair -Q ingestor,broadcast,config -E --autoscale=1,15 --without-gossip"

if [ "$AWS_SQS" = "True" ]
then
queues="ingestor.fifo,config.fifo"
else
queues="ingestor,broadcast,config"
fi

ARGUMENTS="-A intel_owl.celery worker -n worker_ingestor --uid www-data --gid www-data --time-limit=40000 --pidfile= -Ofair -Q ${queues} -E --autoscale=1,15 --without-gossip"
if [[ $DEBUG == "True" ]] && [[ $DJANGO_TEST_SERVER == "True" ]];
then
echo "Running celery with autoreload"
Expand Down
8 changes: 7 additions & 1 deletion docker/entrypoints/celery_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ until cd /opt/deploy/intel_owl
do
echo "Waiting for server volume..."
done
if [ "$AWS_SQS" = "True" ]
then
queues="local.fifo,config.fifo"
else
queues="local,broadcast,config"
fi

ARGUMENTS="-A intel_owl.celery worker -n worker_local --uid www-data --time-limit=10000 --gid www-data --pidfile= -Ofair -Q local,broadcast,config -E --without-gossip"
ARGUMENTS="-A intel_owl.celery worker -n worker_local --uid www-data --time-limit=10000 --gid www-data --pidfile= -Ofair -Q ${queues} -E --without-gossip"
if [[ $DEBUG == "True" ]] && [[ $DJANGO_TEST_SERVER == "True" ]];
then
echo "Running celery with autoreload"
Expand Down
9 changes: 8 additions & 1 deletion docker/entrypoints/celery_long.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ until cd /opt/deploy/intel_owl
do
echo "Waiting for server volume..."
done
ARGUMENTS="-A intel_owl.celery worker -n worker_long --uid www-data --gid www-data --time-limit=40000 --pidfile= -Ofair -Q long,broadcast,config -E --without-gossip"
if [ "$AWS_SQS" = "True" ]
then
queues="long.fifo,config.fifo"
else
queues="long,broadcast,config"
fi

ARGUMENTS="-A intel_owl.celery worker -n worker_long --uid www-data --gid www-data --time-limit=40000 --pidfile= -Ofair -Q ${queues} -E --without-gossip"
if [[ $DEBUG == "True" ]] && [[ $DJANGO_TEST_SERVER == "True" ]];
then
echo "Running celery with autoreload"
Expand Down
Loading