Skip to content

Commit

Permalink
Merge pull request #3875 from M0ses/fix-sphinx-startup
Browse files Browse the repository at this point in the history
[dist] fix obsapidelayed startup at first start
  • Loading branch information
M0ses committed Sep 21, 2017
2 parents 6bfd014 + e105276 commit a72e6da
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dist/obsapidelayed
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ case "$1" in
run_in_api script/delayed_job.api.rb --queue=consistency_check start -i 1050
rc_status -v
echo -n "Starting OBS searchd daemon "
run_in_api rails.ruby2.4 ts:start
FILE_SIZE=`stat -c '%s' /srv/www/obs/api/config/production.sphinx.conf`
if [ $FILE_SIZE -eq 0 ];then
run_in_api rails.ruby2.4 ts:rebuild
else
run_in_api rails.ruby2.4 ts:start
fi
rc_status -v
echo -n "Starting OBS api clock daemon "
run_in_api $CLOCKWORKD --log-dir=log -l -c config/clock.rb start
Expand Down

0 comments on commit a72e6da

Please sign in to comment.