Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Running Multiple Workers

Esmé Cowles edited this page Jun 15, 2017 · 3 revisions

In order to run workers on one or more separate servers, a few things need to be configured to prevent conflicts or problems with not being able to access local resources on the other machines:

Database Minter

By default, NOID uses a local statefile. To coordinate identifier minting between nodes, use the database minter state instead. This can be configured in an initializer:

ActiveFedora::Noid.configure do |config|
  config.minter_class = ActiveFedora::Noid::Minter::Db
end

When switching from a statefile to the database, be sure to migrate your minter state to avoid minting duplicate IDs, as described in the AF::Noid README.

Shared Filesystem

Temporary files, such as uploaded files not loaded into Fedora, or generated derivates, are expected to be on the local filesystem in tmp/derivatives and tmp/uploads. To share these between nodes, use network-mounted storage (SMB, NFS, etc.) for these directories. To avoid issues with setting these directories up with each deploy, create them in the shared directory and link them with Capistrano's linked_dirs directive:

set :linked_dirs, fetch(:linked_dirs, []).push('tmp/derivatives', 'tmp/uploads', ...)
Clone this wiki locally