How to use the huey.contrib.djhuey.task function in huey

To help you get started, we’ve selected a few huey examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github coleifer / huey / examples / django_ex / one_queue / test_app / tasks.py View on Github external
@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')
github bpepple / bamf / comics / tasks.py View on Github external
@task()
def refresh_team_task(cvid):
    ci = ComicImporter()
    success = ci.refreshTeamData(cvid)

    return success
github bpepple / bamf / comics / tasks.py View on Github external
@task()
def refresh_arc_task(cvid):
    ci = ComicImporter()
    success = ci.refreshArcData(cvid)

    return success
github bpepple / bamf / comics / tasks.py View on Github external
@task()
def refresh_character_task(cvid):
    ci = ComicImporter()
    success = ci.refreshCharacterData(cvid)

    return success
github bpepple / bamf / comics / tasks.py View on Github external
@task()
def refresh_publisher_task(cvid):
    ci = ComicImporter()
    success = ci.refreshPublisherData(cvid)

    return success
github bpepple / bamf / comics / tasks.py View on Github external
@task()
def refresh_creator_task(cvid):
    ci = ComicImporter()
    success = ci.refreshCreatorData(cvid)

    return success
github bpepple / bamf / comics / tasks.py View on Github external
@task()
def refresh_issue_task(cvid):
    ci = ComicImporter()
    success = ci.refreshIssueData(cvid)

    return success
github bpepple / bamf / comics / tasks.py View on Github external
@task()
def import_comic_files_task():
    ci = ComicImporter()
    ci.import_comic_files()

    return