Example #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
     ]
Example #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]
Example #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)
Example #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]