Пример #1
0
 def add_photo_tasks(app):
     photos = get_iss_photos()
     question = app_config['question']
     [
         create_photo_task(app, p, question, priority=random.random())
         for p in photos
     ]
Пример #2
0
 def add_photo_tasks(app):
     # First of all we get the URL photos
     # Then, we have to create a set of tasks for the application
     # For this, we get first the photo URLs from Flickr
     photos = get_iss_photos(start=options.start, mission=options.mission,
                             n_photos=options.n_photos)
     question = app_config['question']
     [create_photo_task(app, p, question, priority=random.random()) for p in photos]
Пример #3
0
 def add_photo_tasks(app):
     # First of all we get the URL photos
     # Then, we have to create a set of tasks for the application
     # For this, we get first the photo URLs from Flickr
     photos = get_iss_photos(lista=options.lista, mission=options.mission,
                             )
     question = app_config['question']
     c=0
     for p in photos:
         create_photo_task(app, p, question, priority=random.random())
         c+=1
         if  c%150==0:
             print p
             time.sleep(900)
Пример #4
0
 def add_photo_tasks(app):
     photos = get_iss_photos(                                )
     question = app_config['question']
     [create_photo_task(app, p, question, priority=random.random()) for p in photos]