allow a request to be processed in a job

Now we allow a request to be passed into a job queue,
and after the job finishes the request is passed into
a controller again. In order to achieve this we have
a requests queue in System, when we put a request
to the job this Request structure is preserved in the
queue and for a new request a new Request is added to
the queue.

while here:
- remove App::Lock()/Unlock(), use scoped locking
- fix: Plugin now has a Call method which takes ModelConnector
  and a logger (used in multithreaded environment)
- BaseThread has a main_model_connector pointer
  to the main (from the main thread) model connector
- the FastCGI structure fcgi_request moved from App to Request
- some methods for handling requests moved from App to Request
- small refactoring in main.cpp
- add Http class (a http client)
This commit is contained in:
2022-07-25 14:21:21 +02:00
parent b2d92b85a0
commit 979ef907fe
65 changed files with 7018 additions and 4437 deletions

View File

@@ -83,6 +83,11 @@ public:
static constexpr const wchar_t * text_csv_utf8 = L"text/csv; charset=UTF-8";
static constexpr const wchar_t * text_javascript_utf8 = L"text/javascript; charset=UTF-8";
static constexpr const wchar_t * application_x_www_form_urlencoded = L"application/x-www-form-urlencoded";
static constexpr const wchar_t * multipart_form_data = L"multipart/form-data";
static constexpr const wchar_t * bearer = L"Bearer";
static const int status_200_ok = 200;
static const int status_300_multiple_choices = 300;
@@ -95,6 +100,7 @@ public:
static const int status_404_not_found = 404;
static const int status_414_uri_too_long = 414;
static const int status_500_internal_server_error = 500;
static const int status_503_service_unavailale = 503;
static constexpr const wchar_t * str_status_200 = L"OK";
@@ -108,6 +114,7 @@ public:
static constexpr const wchar_t * str_status_404 = L"Not Found";
static constexpr const wchar_t * str_status_414 = L"URI Too Long";
static constexpr const wchar_t * str_status_500 = L"Internal Server Error";
static constexpr const wchar_t * str_status_503 = L"Service Unavailable";
static const wchar_t * find_status_string_value(int http_status);
@@ -135,6 +142,7 @@ protected:
{status_404_not_found, str_status_404},
{status_414_uri_too_long, str_status_414},
{status_500_internal_server_error, str_status_500},
{status_503_service_unavailale, str_status_503},
};
};