Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
auto-create queue if does not exist.
also hack to remove stale pid file
James Babb committed Jun 3, 2019
1 parent 93875b6 commit 147cf32
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/SIS/app/models/course.rb
@@ -12,6 +12,9 @@ def publish_to_rabbit(action)

channel = rabbit_connection.create_channel

# Create the queue if it does not exist
channel.queue("sis.course", :exclusive => false)

# TODO: allow user to specify exchange in config
exchange = channel.default_exchange

3 changes: 3 additions & 0 deletions Sources/SIS/app/models/user.rb
@@ -48,6 +48,9 @@ def publish_to_rabbit(action)

channel = rabbit_connection.create_channel

# Create the queue if it does not exist
channel.queue("sis.user", :exclusive => false)

# TODO: allow user to specify exchange in config
exchange = channel.default_exchange

3 changes: 3 additions & 0 deletions Sources/SIS/run-rails.sh
@@ -23,7 +23,10 @@ fi
# Do not start if we did not bootstrap
if [ ! -f /FIRSTRUN ]
then
# HACK...delete the pid file that seems to stick around
rm -f /myapp/tmp/pids/server.pid
bundle exec rails s -p 3000 -b '0.0.0.0'
rm -f /myapp/tmp/pids/server.pid
else
echo "Bootstrap was not completed. Not starting..."
fi

0 comments on commit 147cf32

Please sign in to comment.