Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@task()
def mul(a, b):
return a * b
@task(retries=3, retry_delay=10)
def try_thrice():
if random.randint(1, 3) == 1:
print('OK')
else:
print('About to fail, will retry in 10 seconds')
raise Exception('Crap something went wrong')
@task()
def add(a, b):
return a + b
@task()
def refresh_team_task(cvid):
ci = ComicImporter()
success = ci.refreshTeamData(cvid)
return success
@task()
def refresh_arc_task(cvid):
ci = ComicImporter()
success = ci.refreshArcData(cvid)
return success
@task()
def refresh_character_task(cvid):
ci = ComicImporter()
success = ci.refreshCharacterData(cvid)
return success
@task()
def refresh_publisher_task(cvid):
ci = ComicImporter()
success = ci.refreshPublisherData(cvid)
return success
@task()
def refresh_creator_task(cvid):
ci = ComicImporter()
success = ci.refreshCreatorData(cvid)
return success
@task()
def refresh_issue_task(cvid):
ci = ComicImporter()
success = ci.refreshIssueData(cvid)
return success
@task()
def import_comic_files_task():
ci = ComicImporter()
ci.import_comic_files()
return