|  | @@ -29,6 +29,12 @@ and something always will...
 | 
											
												
													
														|  |  For this reason your tasks run-time should not exceed the timeout.
 |  |  For this reason your tasks run-time should not exceed the timeout.
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +.. note::
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +    In order for this to work correctly you need to be using a cache
 | 
											
												
													
														|  | 
 |  | +    backend where the ``.add`` operation is atomic.  ``memcached`` is known
 | 
											
												
													
														|  | 
 |  | +    to work well for this purpose.
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  .. code-block:: python
 |  |  .. code-block:: python
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      from celery import task
 |  |      from celery import task
 | 
											
										
											
												
													
														|  | @@ -71,8 +77,3 @@ For this reason your tasks run-time should not exceed the timeout.
 | 
											
												
													
														|  |                  return Feed.objects.import_feed(feed_url).url
 |  |                  return Feed.objects.import_feed(feed_url).url
 | 
											
												
													
														|  |          logger.debug(
 |  |          logger.debug(
 | 
											
												
													
														|  |              'Feed %s is already being imported by another worker', feed_url)
 |  |              'Feed %s is already being imported by another worker', feed_url)
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -Note that in order for this to work correctly you need to be using a cache
 |  | 
 | 
											
												
													
														|  | -backend that supports an atomic ``.add`` operation.  ``memcached`` is known
 |  | 
 | 
											
												
													
														|  | -to work well for this purpose.
 |  | 
 |