"Shannon -jj Behrens" <[EMAIL PROTECTED]> writes:

> On 1/4/07, David Smith <[EMAIL PROTECTED]> wrote:
>
>> I'm writing a webapp that mails a newsletter to registered
>> users every month. It requires access to the same database that
>> the webapp uses and so I'd like to have it use the same
>> pastedeploy config file where the dsn is defined. I'm currently
>> doing this with a standard configparser but it makes me think
>> that I'm looking at a pattern that is not implemented in paste
>> yet; that is, often there are batch applications that are used
>> with web apps and they should share configuration,
>> transaction support, and possibly other framework details.
>
> Do something general that meets your needs.  Do whatever you want with
> your configuration and transaction stuff.  Then, using your
> configuration, auto-generate the .ini file for Paste.
>
> Alternatively, in the past, I've used cron to call a Web page that did
> work like you're doing, and it worked fine.

Well, that's what I'm doing already as I wrote above. Regarding
using cron to call a web page, I can concede there are times
when that may be just the right thing to do, but that's the
exception, not the norm. In my response to Ian's suggestion of
the fetch command, I mentioned that these commands are
generally better off not included in the webapp's URL tree.

Having to either write my own config parser or paste config
generator seems to defeat the point of using pastedeploy's
config system. The simple solution seems obvious to add a
config directive for supporting non-WSGI commands; given that
exe and server sections already exist, my patch is a
generalization of the server in that instead of being passed a
WSGI app by paste, it is left unspecified and the command can
run zero, one, or many apps on its own.

Please consider the original patch, thanks
-- 
  David D. Smith

Attachment: pgpjD9NMgICF9.pgp
Description: PGP signature

_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to