<s> from __future__ import absolute_import <EOL> from core . settings import BROKER_URL <EOL> from celery import Celery <EOL> celery = Celery ( '<STR_LIT>' , broker = BROKER_URL ) <EOL> from django . conf import settings <EOL> from core . models import SITE_MODEL , Currency <EOL> from core . spiders import run_site_spider <EOL> @ celery . task <EOL> def run_spiders ( site_ids ) : <EOL> '''<STR_LIT>''' <EOL> sites = [ SITE_MODEL . objects . get ( id = id ) <EOL> for id in site_ids ] <EOL> for site in sites : <EOL> run_site_spider ( site ) <EOL> @ celery . task <EOL> def update_currencies ( ) : <EOL> Currency . update_currencies ( ) </s>
