EVE-Tools / element43

Market, Trade and Industry Manager for EVE Online
BSD 3-Clause "New" or "Revised" License
81 stars 25 forks source link

Prevent creation of duplicate tasks #30

Closed zweizeichen closed 11 years ago

zweizeichen commented 11 years ago

In cases where the EVE API is unavailable and thus slowing down the requests or when there are not enough worker processes available to handle all the scheduled tasks, the task queue will keep growing, because Celery will automatically add duplicate tasks.

This behavior should be prevented.

gtaylor commented 11 years ago

I can't remember the attribute, but there's a timeout or max_time attrib or kwarg for tasks that let you kill a task that take a certain amount of time. This is a better option than messing with socket.settimeout(), which globally alters all socket timeouts.

You may already know this, but figured I'd make sure.