Wrap any task with a running tika server:
TikaWrapper.wrap do |tika| # Something that requires tika end
TikaWrapper.wrap port: '9998'