OK, so how about you queue the request (append to a text file) and send a '200 OK' header.
Then set up a cron job that runs every X minutes (5? 10? 30?).
This is how I'd do it. cron activated script:
- copies file of actions to temp file (to avoid issues of incoming requests corrupting data
- open temp file and action requests
- delete temp file
- open original file (using flock, of course :), remove actioned requests and rewrite
This way, the request data file doesn't get locked for long :)
cLive ;-)
| [reply] |
That's what we do for some of the requests but the problem I am having currently is that we need to pipe some of these through an encryption program such as GPG before writing to disk as they contain sensitive information.
BTW, Thanks for the help!
| [reply] |