durusmail: qp: How to know a Publisher's context
How to know a Publisher's context
2006-04-25
2006-04-25
2006-04-25
Re: How to know a Publisher's context
2006-04-25
How to know a Publisher's context
mario ruggier
2006-04-25
On Apr 25, 2006, at 12:52 PM, David Binger wrote:
> On Apr 25, 2006, at 5:32 AM, mario ruggier wrote:
>
>> is there any way to know, during Publisher initialization, things
>> about the context it is being created in?
>> Specifically, is this Publisher instance being created as an SCGI
>> sub-process, or is it the one for the built-in stand-alone http
>> server? This could be determined from a request's info, as SCGI sets
>> a request variable, but need to know it at init time, i.e. before any
>> request.
>
> I can't think of anything in QP that does this for you.
> I wonder what it is about the Publisher that you want to
> be different between these two contexts.

Just toying with an idea, that may or may not be a valid use case.
Forget for a moment that QP assumes that I use a single db... plus, in
any case, this probably is relevant to other resources that a QP app
publisher might need.

If I would like to use a 2nd durus file as a data store for data that
never changes within a live site but will change during development.
Knowing that a durus file allows one and only one write connection to
it, it occurred to me that as far as this db file is concerned I could
start the standalone web publisher with the write FileConnection, and
the scgi publishers with read-only FileConnections (thus without
needing to run a durus server on this durus file).

Another possible scenario for knowing whether you are running under
scgi or not may be to control things such as exception handling, mail
address for problem reporting, etc.

How do you manage deployment issues between dev and live?

mario

reply