go-exercises-worker, v1.0
Posted on

Background worker of the service for solving programming exercises.
Major version. Implement the solution runner based on the github.com/thewizardplusplus/go-code-runner package.
Change Log
- implement the solution runner based on the github.com/thewizardplusplus/go-code-runner package:
- loading of the allowed imports from an outer configuration;
- add the examples:
- of the request;
- of the allowed import configuration;
- add the integration Docker Compose configuration.
Features
- interaction with queues:
- common properties:
- automatic declaring of the used queues;
- passing of a message data in JSON;
- operations:
- consuming of the solutions:
- concurrent handling;
- once requeue the solution on failure;
- producing of the solution results;
- consuming of the solutions:
- common properties:
- solution runners:
- dummy solution runner (returns the current timestamp as the result);
- solution runner based on the github.com/thewizardplusplus/go-code-runner package:
- loading of the allowed imports from an outer configuration.
Usage
$ go-exercises-backend
Environment variables:
ALLOWED_IMPORT_CONFIG— path to the allowed import config (default:./configs/allowed_imports.json);MESSAGE_BROKER_ADDRESS— RabbitMQ connection URI (default:amqp://rabbitmq:rabbitmq@localhost:5672);SOLUTION_CONSUMER_BUFFER_SIZE— solution consumer channel capacity (default:1000);SOLUTION_CONSUMER_CONCURRENCY— amount of solution consumer threads (default:1000).
Repository
Link: https://github.com/thewizardplusplus/go-exercises-worker/tree/v1.0.
Content: code.
License: MIT.