Beispiel #1
0
 def handle(self, *args, **options):
     hours = options['hours']
     one_hour_back = timezone.now()-timedelta(hours=hours)
     bounties_to_post = Bounty.objects.filter(web3_created__gte=one_hour_back )
     for bounty in bounties_to_post:
         # print (bounty)
         link= maybe_post_on_craigslist(bounty)
         print("Posted {}".format(link))
Beispiel #2
0
 def handle(self, *args, **options):
     hours = options['hours']
     one_hour_back = timezone.now() - timedelta(hours=hours)
     bounties_to_post = Bounty.objects.filter(
         web3_created__gte=one_hour_back)
     for bounty in bounties_to_post:
         # print(bounty)
         try:
             print(f'attempting to post {bounty.github_url}')
             link = maybe_post_on_craigslist(bounty)
             print("Posted", link)
         except Exception as e:
             print(e)