ReCodEx - Task Broker
ReCodEx is complex programmer testing solution, primary targeted to technical universities. It's highly customizable and based on modern technologies.
|
#include <status_notifier_handler.h>
Public Member Functions | |
status_notifier_handler (const notifier_config &config, std::shared_ptr< spdlog::logger > logger) | |
void | on_request (const message_container &message, response_cb respond) |
Static Public Attributes | |
static const std::string | TYPE_ERROR = "error" |
static const std::string | TYPE_JOB_STATUS = "job-status" |
Additional Inherited Members | |
![]() | |
typedef std::function< void(const message_container &)> | response_cb |
Receives status notifications from the reactor and forwards them to the frontend REST API
Definition at line 14 of file status_notifier_handler.h.
status_notifier_handler::status_notifier_handler | ( | const notifier_config & | config, |
std::shared_ptr< spdlog::logger > | logger | ||
) |
config | A notifier configuration (contains URL and credentials for the REST API) |
logger | A logger used when a HTTP request fails |
Definition at line 10 of file status_notifier_handler.cpp.
|
virtual |
Process a message the handler is subscribed to
message | message to be processed |
response | callback that enables the handler to respond |
Implements handler_interface.
Definition at line 15 of file status_notifier_handler.cpp.
|
static |
REST API endpoint that receives error messages
Definition at line 20 of file status_notifier_handler.h.
|
static |
REST API endpoint that receives job status messages
Definition at line 25 of file status_notifier_handler.h.