dzrl1120
dzrl1120

Reputation: 1

Worried about threading in python on apache server

I don't need the threads to be aware of each other. They just need to preform a task that shouldn't take more than two or three seconds tops. What can I do to guarantee that the tread will not be killed before the task is completed. Also, I need to use the occasionally timer thread. The timer is only for a minute but I'm nervous about that being too long for apache.

Upvotes: 0

Views: 150

Answers (1)

milkypostman
milkypostman

Reputation: 3043

Why don't start these threads in the background? Why do they need to be part of the webserver? I would suggest that you write some scripts that either sit idle in the background all the time, or are called periodically by a cron job. The python scripts could lookup info in the database or even use a file to indicate what it needs to do, run, then exit.

Upvotes: 1

Related Questions