# Path: kale/task.py
# PERMANENT_FAILURE_UNRECOVERABLE = 'unrecoverable'
# PERMANENT_FAILURE_NO_RETRY = 'no_retries'
# PERMANENT_FAILURE_RETRIES_EXCEEDED = 'max_retries'
#     EXCEPTION_LIST = (
#         exceptions.BlacklistedException,
#         KeyError,
#         NotImplementedError,
#         SyntaxError,
#         UnboundLocalError)
# class Task(object):
#     def __init__(self, message_body=None, *args, **kwargs):
#     def _get_publisher():
#     def _get_task_id(cls, *args, **kwargs):
#     def publish(cls, app_data, *args, **kwargs):
#     def _get_delay_sec_for_retry(cls, current_retry_num):
#     def handle_failure(cls, message, raised_exception, increment_failure_num=True):
#     def republish(cls, message, failure_count):
#     def run(self, *args, **kwargs):
#     def run_task(self, *args, **kwargs):
#     def should_run_task(self, *args, **kwargs):
#     def _check_blacklist(self, *args, **kwargs):
#     def _dequeued(self, *args, **kwargs):
#     def _setup_task_environment():
#     def _clean_task_environment(task_id=None, task_name=None, exc=None):
#     def _pre_run(self, *args, **kwargs):
#     def _post_run(self, *args, **kwargs):
#     def _alert_runtime_exceeded(self, *args, **kwargs):
#     def _kill_runtime_exceeded(self, *args, **kwargs):
#     def _report_permanent_failure(cls, message, exception, failure_type,
#                                   log_exception):


import logging
from kale import task
from __future__ import absolute_import
from __future__ import print_function



logger = logging.getLogger(__name__)



# Path: kale/task.py
# PERMANENT_FAILURE_UNRECOVERABLE = 'unrecoverable'
# PERMANENT_FAILURE_NO_RETRY = 'no_retries'
# PERMANENT_FAILURE_RETRIES_EXCEEDED = 'max_retries'
#     EXCEPTION_LIST = (
#         exceptions.BlacklistedException,
#         KeyError,
#         NotImplementedError,
#         SyntaxError,
#         UnboundLocalError)
# class Task(object):
#     def __init__(self, message_body=None, *args, **kwargs):
#     def _get_publisher():
#     def _get_task_id(cls, *args, **kwargs):
#     def publish(cls, app_data, *args, **kwargs):
#     def _get_delay_sec_for_retry(cls, current_retry_num):
#     def handle_failure(cls, message, raised_exception, increment_failure_num=True):
#     def republish(cls, message, failure_count):
#     def run(self, *args, **kwargs):
#     def run_task(self, *args, **kwargs):
#     def should_run_task(self, *args, **kwargs):
#     def _check_blacklist(self, *args, **kwargs):
#     def _dequeued(self, *args, **kwargs):
#     def _setup_task_environment():
#     def _clean_task_environment(task_id=None, task_name=None, exc=None):
#     def _pre_run(self, *args, **kwargs):
#     def _post_run(self, *args, **kwargs):
#     def _alert_runtime_exceeded(self, *args, **kwargs):
#     def _kill_runtime_exceeded(self, *args, **kwargs):
#     def _report_permanent_failure(cls, message, exception, failure_type,
#                                   log_exception):


# Path: example/taskworker/tasks.py
import logging
from kale import task

from __future__ import absolute_import
from __future__ import print_function



logger = logging.getLogger(__name__)



class FibonacciTask(task.Task):