Running Weaver

Running Weaver Service

Before running Weaver, you must make sure that the required MongoDB connection is accessible according to specified connection settings in weaver/config/weaver.ini.

Weaver installation comes with a Makefile which provides a shortcut command to start the application with Gunicorn:

Note

If using Windows, make sure you have read the Windows Installation section.

$ make start    # start Weaver WSGI application server

Weaver should be running after this operation. It will be available under the configured URL endpoint in weaver.ini (see weaver.ini.example). If everything was configured correctly, calling this URL (default: http://localhost:4001) should provide a response containing a JSON body with basic information about Weaver.

Execution Details

To execute, Weaver requires two type of application executed in parallel. First, it requires a WSGI HTTP server that will run the application to provide API endpoints. This is referred to as weaver-manager in the provided docker images. Second, Weaver requires a Celery task queue handler to execute submitted process jobs. This is referred to as weaver-worker in built Docker images.

For specific details about configuration of both applications, please refer to Configuration section.

The typical commands that need to be executed for the manager and worker applications should be similar to the following calls. Obviously, additional arguments supported by the corresponding applications can be provided.

# manager
pserve <weaver-root>/config/weaver.ini

# worker
celery worker -A pyramid_celery.celery_app --ini <weaver-root>/config/weaver.ini

Using WPS Application

See Tutorial.