Regards Estartu
Am 14.10.23 um 13:42 schrieb Thierry Florac:
Maybe I'm wrong, but I think that you can get access to the "global" registry settings without the need of getting a request, no?Regards, Thierry --https://www.ulthar.net <https://www.ulthar.net> -- http://pyams.readthedocs.io <http://pyams.readthedocs.io>Le sam. 14 oct. 2023 à 11:14, Gerhard Schmidt <[email protected] <mailto:[email protected]>> a écrit :The ApplicationCreated doesn't get a request object. So no luck there. Regards Estartu Am 13.10.23 um 20:32 schrieb Mike Orr: > Maybe there's a variable in the WSGI environment that a real server > sets but an emulating script doesn't, or has a value that can be > distinguished as "real". For instance, a real request will have the > user agent set to a long string of version numbers and > backward-compatibility identifiers, while an emulated request may not > bother setting it or may set it to something simple like "wsgi" or > "python". > > On Thu, Oct 12, 2023 at 10:00 PM Gerhard Schmidt <[email protected] <mailto:[email protected]>> wrote: >> >> Hi there, >> >> I'm often running into the problem to determinate if the current app is >> running as a server to server http requests or created from a console >> script to do specific things. >> >> Mostly it's to decide if a background thread should be started (needed >> in the Server) or not (can cause problems in the console script) in the >> ApplicationCreated event. >> >> I'm using pyramid.paster.bootstrap to set up the app for a console script. >> >> The problem is, the ApplicationCreated is called before I have a chance >> to set anything in the registry to pass information along. >> >> I there a clean way know from the app object passed to the event alone. >> I tried to pass a custom Request to bootstrap but the request is not >> passed to this event. >> >> Regards >> Estartu >> >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups "pylons-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:pylons-discuss%[email protected]>. >> To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/008829c9-1180-4365-9f69-d22d59a09ccd%40augusta.de <https://groups.google.com/d/msgid/pylons-discuss/008829c9-1180-4365-9f69-d22d59a09ccd%40augusta.de>. > > >-- You received this message because you are subscribed to the GoogleGroups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:pylons-discuss%[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/1a530488-65ba-4e45-9f55-c5a88258d268%40augusta.de <https://groups.google.com/d/msgid/pylons-discuss/1a530488-65ba-4e45-9f55-c5a88258d268%40augusta.de>. --You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAPX_VWBHrkNrLc-LhSx9prW%2BjAdhu2maS33bqZmzQWWyQ_ofXg%40mail.gmail.com <https://groups.google.com/d/msgid/pylons-discuss/CAPX_VWBHrkNrLc-LhSx9prW%2BjAdhu2maS33bqZmzQWWyQ_ofXg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
-- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/0d9bcd7d-cf49-44ac-9245-b237a48475cc%40augusta.de.
OpenPGP_0x3EE6A5DC78826E6B.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature
