stocks/tasks.py
def download_news_task():
    '''
    Creates a news downloading task chain
    '''
    news_tasks = [
        download_and_store_news.signature(
            (
                share.title,
                share.id
            ),
            countdown=30,
            immutable=True
        )
        for share in Share.objects.all()
    ]
    logger = download_news_task.get_logger()
    logger.info("Starting news task chain!")
    chain(news_tasks).apply_async()

    Creates a news downloading task chain
    
Creates a news downloading task chain
Creates a news downloading task chain
def download_news_task():
    news_tasks = [
        download_and_store_news.signature(
            (
                share.title,
                share.id
            ),
            countdown=30,
            immutable=True
        )
        for share in Share.objects.all()
    ]
    logger = download_news_task.get_logger()
    logger.info("Starting news task chain!")
    chain(news_tasks).apply_async()
def download_news_task ( ) : news_tasks = [ download_and_store_news . signature ( ( share . title , share . id ) , countdown = 30 , immutable = True ) for share in Share . objects . all ( ) ] logger = download_news_task . get_logger ( ) logger . info ( "Starting news task chain!" ) chain ( news_tasks ) . apply_async ( )
Creates a news downloading task chain
Creates a news downloading task chain
'''
    Creates a news downloading task chain
    '''