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:
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008-2021, Tomasz Sowa
|
||||
* Copyright (c) 2008-2022, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -180,6 +180,7 @@ namespace Winix
|
||||
|
||||
// the request is being ended
|
||||
// you can clear some of your objects here
|
||||
// in p1 you have a pointer to the Request object
|
||||
#define WINIX_END_REQUEST 30140
|
||||
|
||||
// a new file (page) has been added
|
||||
@@ -323,6 +324,13 @@ namespace Winix
|
||||
// session is null
|
||||
// if you process the job then return 'true' from the processing method (from plugin call)
|
||||
// so this prevent to make a standard (system) job
|
||||
// in l1 there is a job type (from JobTask structure), e.g. if you want to know whether
|
||||
// the job is a request continuation you should compare l1 == JobTask::JOB_TYPE_REQUEST_CONTINUATION
|
||||
// in l2 there is a job_id - the values passed to the Job::Add(long job_id, ...) method
|
||||
// if you have called Add(...) without long job_id parameter then the default value JobTask::JOB_ID_DEFAULT is used
|
||||
// if the job type is JobTask::JOB_TYPE_REQUEST_CONTINUATION then a pointer to Session can be set,
|
||||
// such a Session has allow_to_delete flag set to false but of course you have to Lock/Unlock when
|
||||
// you are using this structure
|
||||
#define WINIX_JOB 31200
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user