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

@@ -94,7 +94,7 @@ public:
bool log_stdout;
// how many requests should be saved in the same time
// if you have a very busy server you can incrase this value
// if you have a very busy server you can increase this value
// default: 1
int log_request;
@@ -934,7 +934,7 @@ public:
// default: X_Real_IP
std::wstring proxy_ip_header;
// use an antismap mechanism for not logged users
// use an antispam mechanism for not logged users
// when they try to add a new item
// default: true
bool use_antispam_mechanism_for_not_logged_users;
@@ -952,6 +952,13 @@ public:
// https://github.com/bigskysoftware/htmx/issues/497
bool add_header_cache_no_store_in_htmx_request;
// a limit for the queue for requests
// when a request is scheduled to a job
// default: 1024
// if the limit is reached then the http status 503 Service Unavailable is returned
size_t request_queue_job_limit;
Config();