This is the code package for the pygments worker from the sample repository.
You can find the .worker file here.
runtime "ruby" # include postgresql and activerecord gem "pg" gem "activerecord" exec "pygments_worker.rb" # Merging models dir '../../app/models/' full_remote_build true
Let's breakdown this file line by line:
gem "activerecord"will package up the two gems into the
__gem__folder in the root directory of the worker
exec "pygments_worker.rb"will package up the
pygments_worker.rbruby file and this execute this file when a worker is run.
dir '../../app/models/'means that we will go two directories up from our current directory (location of the .worker file) and then go into the app directory and then package up all the files in the
modelsdirectory and then we will basically save the directory in the root directory of the worker. As you can see here.
full_remote_build truemeans that for gems like
pgwhich requires building native extensions. We will build the native extension on iron.io server.
Here is the corresponding documentation on how to construct your .worker file.