funboost 47.6__tar.gz → 47.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of funboost might be problematic. Click here for more details.
- {funboost-47.6/funboost.egg-info → funboost-47.8}/PKG-INFO +91 -5
- {funboost-47.6 → funboost-47.8}/funboost/__init__.py +1 -1
- {funboost-47.6 → funboost-47.8}/funboost/consumers/base_consumer.py +3 -2
- {funboost-47.6 → funboost-47.8}/funboost/core/func_params_model.py +8 -1
- {funboost-47.6 → funboost-47.8}/funboost/utils/class_utils.py +6 -6
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/readme.md +7 -0
- funboost-47.8/funboost/utils/func_timeout/StoppableThread.py +134 -0
- funboost-47.8/funboost/utils/func_timeout/__init__.py +0 -0
- funboost-47.8/funboost/utils/func_timeout/dafunc.py +244 -0
- funboost-47.8/funboost/utils/func_timeout/exceptions.py +98 -0
- funboost-47.8/funboost/utils/func_timeout/py2_raise.py +7 -0
- funboost-47.8/funboost/utils/func_timeout/py3_raise.py +7 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/redis_manager.py +16 -16
- {funboost-47.6 → funboost-47.8/funboost.egg-info}/PKG-INFO +91 -5
- {funboost-47.6 → funboost-47.8}/funboost.egg-info/SOURCES.txt +6 -0
- {funboost-47.6 → funboost-47.8}/funboost.egg-info/entry_points.txt +0 -1
- {funboost-47.6 → funboost-47.8}/funboost.egg-info/requires.txt +2 -0
- {funboost-47.6 → funboost-47.8}/setup.py +4 -1
- {funboost-47.6 → funboost-47.8}/LICENSE +0 -0
- {funboost-47.6 → funboost-47.8}/MANIFEST.in +0 -0
- {funboost-47.6 → funboost-47.8}/README.md +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/__init__old.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/__main__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/assist/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/assist/celery_helper.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/assist/dramatiq_helper.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/assist/faststream_helper.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/assist/huey_helper.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/assist/rocketry_helper.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/assist/rq_helper.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/assist/rq_windows_worker.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/assist/taskiq_helper.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/beggar_version_implementation/beggar_redis_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/async_helper.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/async_pool_executor.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/backup/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/backup/async_pool_executor0223.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/backup/async_pool_executor_back.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/backup/async_pool_executor_janus.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/base_pool_type.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/bounded_processpoolexcutor_gt_py37.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/bounded_processpoolexcutor_py36.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/bounded_threadpoolexcutor.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/concurrent_pool_with_multi_process.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/custom_evenlet_pool_executor.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/custom_gevent_pool_executor.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/custom_threadpool_executor.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/custom_threadpool_executor000.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/fixed_thread_pool.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/flexible_thread_pool.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/pool_commons.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/concurrent_pool/single_thread_executor.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/constant.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/celery_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/confirm_mixin.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/dramatiq_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/empty_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/faststream_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/http_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/http_consumer000.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/httpsqs_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/huey_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/kafka_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/kafka_consumer_manually_commit.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/kombu_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/local_python_queue_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/memory_deque_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/mongomq_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/mqtt_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/nameko_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/nats_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/nsq_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/peewee_conusmer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/persist_queue_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/pulsar_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/rabbitmq_amqpstorm_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/rabbitmq_pika_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/rabbitmq_pika_consumerv0.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/rabbitmq_rabbitpy_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/redis_brpoplpush_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/redis_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/redis_consumer_ack_able.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/redis_consumer_ack_using_timeout.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/redis_consumer_priority.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/redis_consumer_simple.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/redis_filter.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/redis_pubsub_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/redis_stream_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/rocketmq_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/rq_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/sqlachemy_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/tcp_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/txt_file_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/udp_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/consumers/zeromq_consumer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/contrib/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/contrib/api_publish_msg.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/contrib/django_db_deco.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/contrib/queue2queue.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/contrib/redis_consume_latest_msg_broker.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/contrib/save_result_status_to_sqldb.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/active_cousumer_info_getter.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/booster.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/cli/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/cli/discovery_boosters.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/cli/funboost_cli_user_templ.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/cli/funboost_fire.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/current_task.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/exceptions.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/fabric_deploy_helper.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/funboost_config_getter.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/funboost_time.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/function_result_status_config.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/function_result_status_saver.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/helper_funs.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/kill_remote_task.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/lazy_impoter.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/loggers.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/msg_result_getter.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/muliti_process_enhance.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/serialization.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/core/task_id_logger.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/factories/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/factories/broker_kind__publsiher_consumer_type_map.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/factories/consumer_factory.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/factories/publisher_factotry.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/funboost_config_deafult.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/__pycache__/app.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/__pycache__/functions.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/app.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/functions.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/static/assets/css/custom.css +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/static/assets/css/jquery.mCustomScrollbar.min.css +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/static/assets/img/user.jpg +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/static/assets/js/custom.js +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/static/assets/js/jquery.mCustomScrollbar.concat.min.js +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/static/css/style.css +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/static/images/bg.jpg +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/static/images/password.png +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/static/images/tick.png +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/static/images/user.png +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/static/js/jquery-1.11.0.min.js +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/templates/index.html +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/function_result_web/templates/login.html +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/base_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/celery_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/celery_publisher000.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/confluent_kafka_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/dramatiq_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/empty_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/faststream_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/http_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/httpsqs_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/huey_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/kafka_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/kombu_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/local_python_queue_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/meomory_deque_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/mongomq_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/mqtt_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/nameko_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/nats_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/nsq_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/peewee_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/persist_queue_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/pulsar_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/rabbitmq_amqpstorm_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/rabbitmq_pika_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/rabbitmq_rabbitpy_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/redis_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/redis_publisher_lpush.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/redis_publisher_priority.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/redis_publisher_simple.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/redis_pubsub_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/redis_queue_flush_mixin.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/redis_stream_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/rocketmq_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/rq_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/sqla_queue_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/tcp_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/txt_file_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/udp_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/publishers/zeromq_publisher.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/queues/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/queues/memory_queues_map.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/queues/peewee_queue.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/queues/sqla_queue.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/set_frame_config.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/timing_job/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/timing_job/apscheduler_use_mysql_store.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/timing_job/apscheduler_use_redis_store.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/apscheduler_monkey.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/block_exit.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/bulk_operation.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/ctrl_c_end.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/custom_pysnooper.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/decorators.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages/mongomq/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages/mongomq/lock.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages/mongomq/mongomq.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages/mongomq/mongomq0000.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages/mongomq/test.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages/mongomq/utils.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/__pycache__/__init__.cpython-311.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/__pycache__/__init__.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/__pycache__/__init__.cpython-39.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/__pycache__/add_to_pythonpath.cpython-311.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/__pycache__/add_to_pythonpath.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/__pycache__/add_to_pythonpath.cpython-39.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/add_to_pythonpath.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/__init__.cpython-311.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/__init__.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/__init__.cpython-39.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/client.cpython-311.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/client.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/client.cpython-39.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/compat.cpython-311.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/compat.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/compat.cpython-39.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/connection.cpython-311.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/connection.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/connection.cpython-39.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/exceptions.cpython-311.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/exceptions.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/exceptions.cpython-39.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/lock.cpython-311.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/lock.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/lock.cpython-39.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/utils.cpython-311.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/utils.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/__pycache__/utils.cpython-39.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/client.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/compat.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/connection.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/exceptions.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/lock.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/log.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/py.typed +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/readme.md +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/sentinel.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/aioredis/utils.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/StoppableThread.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/StoppableThread.cpython-311.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/StoppableThread.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/StoppableThread.cpython-39.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/__init__.cpython-311.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/__init__.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/__init__.cpython-39.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/dafunc.cpython-311.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/dafunc.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/dafunc.cpython-39.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/exceptions.cpython-311.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/exceptions.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/exceptions.cpython-39.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/py3_raise.cpython-311.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/py3_raise.cpython-37.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/__pycache__/py3_raise.cpython-39.pyc +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/dafunc.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/dafunc2222.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/exceptions.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/py2_raise.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/dependency_packages_in_pythonpath/func_timeout/py3_raise.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/develop_log.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/expire_lock.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/json_helper.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/mongo_util.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/monkey_color_log.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/monkey_patches.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/mqtt_util.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/paramiko_util.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/pysnooper_ydf/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/pysnooper_ydf/pycompat.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/pysnooper_ydf/tracer.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/pysnooper_ydf/utils.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/pysnooper_ydf/variables.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/rabbitmq_factory.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/redis_manager_old.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/resource_monitoring.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/restart_python.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/simple_data_class.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/str_utils.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/time_util.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/times/__init__.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/times/version.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost/utils/un_strict_json_dumps.py +0 -0
- {funboost-47.6 → funboost-47.8}/funboost.egg-info/dependency_links.txt +0 -0
- {funboost-47.6 → funboost-47.8}/funboost.egg-info/top_level.txt +0 -0
- {funboost-47.6 → funboost-47.8}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: funboost
|
|
3
|
-
Version: 47.
|
|
3
|
+
Version: 47.8
|
|
4
4
|
Summary: pip install funboost,python全功能分布式函数调度框架,funboost的功能是全面性重量级,用户能想得到的功能99%全都有;funboost的使用方式是轻量级,只有@boost一行代码需要写。支持python所有类型的并发模式和一切知名消息队列中间件,支持如 celery dramatiq等框架整体作为funboost中间件,python函数加速器,框架包罗万象,用户能想到的控制功能全都有。一统编程思维,兼容50% python业务场景,适用范围广。只需要一行代码即可分布式执行python一切函数,99%用过funboost的pythoner 感受是 简易 方便 强劲 强大,相见恨晚
|
|
5
5
|
Home-page: https://github.com/ydf0509/funboost
|
|
6
6
|
Author: bfzs
|
|
@@ -23,12 +23,100 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.10
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.11
|
|
25
25
|
Classifier: Programming Language :: Python :: 3.12
|
|
26
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
26
27
|
Classifier: Topic :: Software Development :: Libraries
|
|
27
28
|
Description-Content-Type: text/markdown
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Dist: nb_log>=13.2
|
|
31
|
+
Requires-Dist: nb_libs>=1.8
|
|
32
|
+
Requires-Dist: nb_time>=2.1
|
|
33
|
+
Requires-Dist: pymongo>=4.6.3
|
|
34
|
+
Requires-Dist: AMQPStorm==2.10.6
|
|
35
|
+
Requires-Dist: rabbitpy==2.0.1
|
|
36
|
+
Requires-Dist: decorator==5.1.1
|
|
37
|
+
Requires-Dist: tomorrow3==1.1.0
|
|
38
|
+
Requires-Dist: persist-queue>=0.4.2
|
|
39
|
+
Requires-Dist: apscheduler>=3.10.1
|
|
40
|
+
Requires-Dist: pikav0
|
|
41
|
+
Requires-Dist: pikav1
|
|
42
|
+
Requires-Dist: redis2
|
|
43
|
+
Requires-Dist: redis3
|
|
44
|
+
Requires-Dist: redis5
|
|
45
|
+
Requires-Dist: redis
|
|
46
|
+
Requires-Dist: setuptools_rust
|
|
47
|
+
Requires-Dist: fabric2==2.6.0
|
|
48
|
+
Requires-Dist: nb_filelock
|
|
49
|
+
Requires-Dist: pysnooper
|
|
50
|
+
Requires-Dist: deprecated
|
|
51
|
+
Requires-Dist: cryptography
|
|
52
|
+
Requires-Dist: auto_run_on_remote
|
|
53
|
+
Requires-Dist: frozenlist
|
|
54
|
+
Requires-Dist: fire
|
|
55
|
+
Requires-Dist: pydantic
|
|
56
|
+
Requires-Dist: orjson
|
|
57
|
+
Requires-Dist: async-timeout
|
|
58
|
+
Requires-Dist: typing-extensions
|
|
28
59
|
Provides-Extra: all
|
|
29
|
-
|
|
60
|
+
Requires-Dist: confluent_kafka==1.7.0; extra == "all"
|
|
61
|
+
Requires-Dist: pulsar-client==3.1.0; python_version >= "3.7" and extra == "all"
|
|
62
|
+
Requires-Dist: celery; extra == "all"
|
|
63
|
+
Requires-Dist: flower; extra == "all"
|
|
64
|
+
Requires-Dist: nameko==2.14.1; extra == "all"
|
|
65
|
+
Requires-Dist: sqlalchemy==1.4.13; extra == "all"
|
|
66
|
+
Requires-Dist: sqlalchemy_utils==0.36.1; extra == "all"
|
|
67
|
+
Requires-Dist: dramatiq==1.14.2; extra == "all"
|
|
68
|
+
Requires-Dist: huey==2.4.5; extra == "all"
|
|
69
|
+
Requires-Dist: rq==1.15.0; extra == "all"
|
|
70
|
+
Requires-Dist: kombu; extra == "all"
|
|
71
|
+
Requires-Dist: eventlet==0.33.3; extra == "all"
|
|
72
|
+
Requires-Dist: gevent==22.10.2; extra == "all"
|
|
73
|
+
Requires-Dist: elasticsearch; extra == "all"
|
|
74
|
+
Requires-Dist: gnsq==1.0.1; extra == "all"
|
|
75
|
+
Requires-Dist: psutil; extra == "all"
|
|
76
|
+
Requires-Dist: peewee==3.17.3; extra == "all"
|
|
77
|
+
Requires-Dist: nats-python; extra == "all"
|
|
78
|
+
Requires-Dist: aiohttp==3.8.3; extra == "all"
|
|
79
|
+
Requires-Dist: paho-mqtt; extra == "all"
|
|
80
|
+
Requires-Dist: rocketmq; extra == "all"
|
|
81
|
+
Requires-Dist: zmq; extra == "all"
|
|
82
|
+
Requires-Dist: pyzmq; extra == "all"
|
|
83
|
+
Requires-Dist: kafka-python==2.0.2; extra == "all"
|
|
84
|
+
Requires-Dist: flask; extra == "all"
|
|
85
|
+
Requires-Dist: flask_bootstrap; extra == "all"
|
|
86
|
+
Requires-Dist: flask_wtf; extra == "all"
|
|
87
|
+
Requires-Dist: wtforms; extra == "all"
|
|
88
|
+
Requires-Dist: flask_login; extra == "all"
|
|
89
|
+
Provides-Extra: extra-brokers
|
|
90
|
+
Requires-Dist: confluent_kafka==1.7.0; extra == "extra-brokers"
|
|
91
|
+
Requires-Dist: pulsar-client==3.1.0; python_version >= "3.7" and extra == "extra-brokers"
|
|
92
|
+
Requires-Dist: celery; extra == "extra-brokers"
|
|
93
|
+
Requires-Dist: flower; extra == "extra-brokers"
|
|
94
|
+
Requires-Dist: nameko==2.14.1; extra == "extra-brokers"
|
|
95
|
+
Requires-Dist: sqlalchemy==1.4.13; extra == "extra-brokers"
|
|
96
|
+
Requires-Dist: sqlalchemy_utils==0.36.1; extra == "extra-brokers"
|
|
97
|
+
Requires-Dist: dramatiq==1.14.2; extra == "extra-brokers"
|
|
98
|
+
Requires-Dist: huey==2.4.5; extra == "extra-brokers"
|
|
99
|
+
Requires-Dist: rq==1.15.0; extra == "extra-brokers"
|
|
100
|
+
Requires-Dist: kombu; extra == "extra-brokers"
|
|
101
|
+
Requires-Dist: eventlet==0.33.3; extra == "extra-brokers"
|
|
102
|
+
Requires-Dist: gevent==22.10.2; extra == "extra-brokers"
|
|
103
|
+
Requires-Dist: elasticsearch; extra == "extra-brokers"
|
|
104
|
+
Requires-Dist: gnsq==1.0.1; extra == "extra-brokers"
|
|
105
|
+
Requires-Dist: psutil; extra == "extra-brokers"
|
|
106
|
+
Requires-Dist: peewee==3.17.3; extra == "extra-brokers"
|
|
107
|
+
Requires-Dist: nats-python; extra == "extra-brokers"
|
|
108
|
+
Requires-Dist: aiohttp==3.8.3; extra == "extra-brokers"
|
|
109
|
+
Requires-Dist: paho-mqtt; extra == "extra-brokers"
|
|
110
|
+
Requires-Dist: rocketmq; extra == "extra-brokers"
|
|
111
|
+
Requires-Dist: zmq; extra == "extra-brokers"
|
|
112
|
+
Requires-Dist: pyzmq; extra == "extra-brokers"
|
|
113
|
+
Requires-Dist: kafka-python==2.0.2; extra == "extra-brokers"
|
|
30
114
|
Provides-Extra: flask
|
|
31
|
-
|
|
115
|
+
Requires-Dist: flask; extra == "flask"
|
|
116
|
+
Requires-Dist: flask_bootstrap; extra == "flask"
|
|
117
|
+
Requires-Dist: flask_wtf; extra == "flask"
|
|
118
|
+
Requires-Dist: wtforms; extra == "flask"
|
|
119
|
+
Requires-Dist: flask_login; extra == "flask"
|
|
32
120
|
|
|
33
121
|
|
|
34
122
|
|
|
@@ -506,5 +594,3 @@ funboost通过支持celery作为broker_kind,使celer框架变成了funboost的
|
|
|
506
594
|

|
|
507
595
|
|
|
508
596
|
<div> </div>
|
|
509
|
-
|
|
510
|
-
|
|
@@ -64,7 +64,8 @@ from funboost.concurrent_pool.async_pool_executor import AsyncPoolExecutor
|
|
|
64
64
|
from funboost.concurrent_pool.bounded_threadpoolexcutor import \
|
|
65
65
|
BoundedThreadPoolExecutor
|
|
66
66
|
from funboost.utils.redis_manager import RedisMixin
|
|
67
|
-
from func_timeout import func_set_timeout # noqa
|
|
67
|
+
# from func_timeout import func_set_timeout # noqa
|
|
68
|
+
from funboost.utils.func_timeout import dafunc
|
|
68
69
|
|
|
69
70
|
from funboost.concurrent_pool.custom_threadpool_executor import check_not_monkey
|
|
70
71
|
from funboost.concurrent_pool.flexible_thread_pool import FlexibleThreadPool, sync_or_async_fun_deco
|
|
@@ -1057,7 +1058,7 @@ class ConcurrentModeDispatcher(FunboostFileLoggerMixin):
|
|
|
1057
1058
|
self.timeout_deco = None
|
|
1058
1059
|
if self._concurrent_mode in (ConcurrentModeEnum.THREADING, ConcurrentModeEnum.SINGLE_THREAD):
|
|
1059
1060
|
# self.timeout_deco = decorators.timeout
|
|
1060
|
-
self.timeout_deco = func_set_timeout # 这个超时装饰器性能好很多。
|
|
1061
|
+
self.timeout_deco = dafunc.func_set_timeout # 这个超时装饰器性能好很多。
|
|
1061
1062
|
elif self._concurrent_mode == ConcurrentModeEnum.GEVENT:
|
|
1062
1063
|
from funboost.concurrent_pool.custom_gevent_pool_executor import gevent_timeout_deco
|
|
1063
1064
|
self.timeout_deco = gevent_timeout_deco
|
|
@@ -205,7 +205,14 @@ class BoosterParams(BaseJsonAbleModel):
|
|
|
205
205
|
|
|
206
206
|
# func_params_is_pydantic_model: bool = False # funboost 兼容支持 函数娼还是 pydantic model类型,funboost在发布之前和取出来时候自己转化。
|
|
207
207
|
|
|
208
|
-
consuming_function_kind: typing.Optional[str] = None #
|
|
208
|
+
consuming_function_kind: typing.Optional[str] = None # 自动生成的信息,不需要用户主动传参,如果自动判断失误就传递。是判断消费函数是函数还是实例方法还是类方法。如果传递了,就不自动获取函数类型。
|
|
209
|
+
''' consuming_function_kind 可以为以下类型,
|
|
210
|
+
class FunctionKind:
|
|
211
|
+
CLASS_METHOD = 'CLASS_METHOD'
|
|
212
|
+
INSTANCE_METHOD = 'INSTANCE_METHOD'
|
|
213
|
+
STATIC_METHOD = 'STATIC_METHOD'
|
|
214
|
+
COMMON_FUNCTION = 'COMMON_FUNCTION'
|
|
215
|
+
'''
|
|
209
216
|
|
|
210
217
|
auto_generate_info: dict = {} # 自动生成的信息,不需要用户主动传参.
|
|
211
218
|
|
|
@@ -14,17 +14,17 @@ from funboost.constant import FunctionKind
|
|
|
14
14
|
class ClsHelper:
|
|
15
15
|
@staticmethod
|
|
16
16
|
def get_instncae_method_cls(instncae_method):
|
|
17
|
-
print(instncae_method)
|
|
18
|
-
print(instncae_method.__qualname__)
|
|
19
|
-
print(instncae_method.__module__)
|
|
17
|
+
# print(instncae_method)
|
|
18
|
+
# print(instncae_method.__qualname__)
|
|
19
|
+
# print(instncae_method.__module__)
|
|
20
20
|
return getattr(sys.modules[instncae_method.__module__],instncae_method.__qualname__.split('.')[0])
|
|
21
21
|
# return instncae_method.__self__.__class__
|
|
22
22
|
|
|
23
23
|
@staticmethod
|
|
24
24
|
def get_classs_method_cls(class_method):
|
|
25
|
-
print(class_method)
|
|
26
|
-
print(class_method.__qualname__)
|
|
27
|
-
print(class_method.__module__)
|
|
25
|
+
# print(class_method)
|
|
26
|
+
# print(class_method.__qualname__)
|
|
27
|
+
# print(class_method.__module__)
|
|
28
28
|
return getattr(sys.modules[class_method.__module__],class_method.__qualname__.split('.')[0])
|
|
29
29
|
|
|
30
30
|
@staticmethod
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
'''
|
|
2
|
+
Copyright (c) 2016, 2017, 2019 Timothy Savannah All Rights Reserved.
|
|
3
|
+
|
|
4
|
+
Licensed under the Lesser GNU Public License Version 3, LGPLv3. You should have recieved a copy of this with the source distribution as
|
|
5
|
+
LICENSE, otherwise it is available at https://github.com/kata198/func_timeout/LICENSE
|
|
6
|
+
'''
|
|
7
|
+
|
|
8
|
+
import os
|
|
9
|
+
import ctypes
|
|
10
|
+
import threading
|
|
11
|
+
|
|
12
|
+
from funboost.core.current_task import FctContextThread
|
|
13
|
+
__all__ = ('StoppableThread', 'JoinThread')
|
|
14
|
+
|
|
15
|
+
class StoppableThread(FctContextThread): # 这里重要,继承的是FctContextThread,而不是原生 threading.Thread
|
|
16
|
+
'''
|
|
17
|
+
StoppableThread - A thread that can be stopped by forcing an exception in the execution context.
|
|
18
|
+
|
|
19
|
+
This works both to interrupt code that is in C or in python code, at either the next call to a python function,
|
|
20
|
+
or the next line in python code.
|
|
21
|
+
|
|
22
|
+
It is recommended that if you call stop ( @see StoppableThread.stop ) that you use an exception that inherits BaseException, to ensure it likely isn't caught.
|
|
23
|
+
|
|
24
|
+
Also, beware unmarked exception handlers in your code. Code like this:
|
|
25
|
+
|
|
26
|
+
while True:
|
|
27
|
+
try:
|
|
28
|
+
doSomething()
|
|
29
|
+
except:
|
|
30
|
+
continue
|
|
31
|
+
|
|
32
|
+
will never be able to abort, because the exception you raise is immediately caught.
|
|
33
|
+
|
|
34
|
+
The exception is raised over and over, with a specifed delay (default 2.0 seconds)
|
|
35
|
+
'''
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _stopThread(self, exception, raiseEvery=2.0):
|
|
39
|
+
'''
|
|
40
|
+
_stopThread - @see StoppableThread.stop
|
|
41
|
+
'''
|
|
42
|
+
if self.is_alive() is False:
|
|
43
|
+
return True
|
|
44
|
+
|
|
45
|
+
self._stderr = open(os.devnull, 'w')
|
|
46
|
+
|
|
47
|
+
# Create "joining" thread which will raise the provided exception
|
|
48
|
+
# on a repeat, until the thread stops.
|
|
49
|
+
joinThread = JoinThread(self, exception, repeatEvery=raiseEvery)
|
|
50
|
+
|
|
51
|
+
# Try to prevent spurrious prints
|
|
52
|
+
joinThread._stderr = self._stderr
|
|
53
|
+
joinThread.start()
|
|
54
|
+
joinThread._stderr = self._stderr
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def stop(self, exception, raiseEvery=2.0):
|
|
58
|
+
'''
|
|
59
|
+
Stops the thread by raising a given exception.
|
|
60
|
+
|
|
61
|
+
@param exception <Exception type> - Exception to throw. Likely, you want to use something
|
|
62
|
+
|
|
63
|
+
that inherits from BaseException (so except BaseException as e: continue; isn't a problem)
|
|
64
|
+
|
|
65
|
+
This should be a class/type, NOT an instance, i.e. MyExceptionType not MyExceptionType()
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
@param raiseEvery <float> Default 2.0 - We will keep raising this exception every #raiseEvery seconds,
|
|
69
|
+
|
|
70
|
+
until the thread terminates.
|
|
71
|
+
|
|
72
|
+
If your code traps a specific exception type, this will allow you #raiseEvery seconds to cleanup before exit.
|
|
73
|
+
|
|
74
|
+
If you're calling third-party code you can't control, which catches BaseException, set this to a low number
|
|
75
|
+
|
|
76
|
+
to break out of their exception handler.
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
@return <None>
|
|
80
|
+
'''
|
|
81
|
+
return self._stopThread(exception, raiseEvery)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class JoinThread(FctContextThread):
|
|
85
|
+
'''
|
|
86
|
+
JoinThread - The workhouse that stops the StoppableThread.
|
|
87
|
+
|
|
88
|
+
Takes an exception, and upon being started immediately raises that exception in the current context
|
|
89
|
+
of the thread's execution (so next line of python gets it, or next call to a python api function in C code ).
|
|
90
|
+
|
|
91
|
+
@see StoppableThread for more details
|
|
92
|
+
'''
|
|
93
|
+
|
|
94
|
+
def __init__(self, otherThread, exception, repeatEvery=2.0):
|
|
95
|
+
'''
|
|
96
|
+
__init__ - Create a JoinThread (don't forget to call .start() ! )
|
|
97
|
+
|
|
98
|
+
@param otherThread <threading.Thread> - A thread
|
|
99
|
+
|
|
100
|
+
@param exception <BaseException> - An exception. Should be a BaseException, to prevent "catch Exception as e: continue" type code
|
|
101
|
+
from never being terminated. If such code is unavoidable, you can try setting #repeatEvery to a very low number, like .00001,
|
|
102
|
+
and it will hopefully raise within the context of the catch, and be able to break free.
|
|
103
|
+
|
|
104
|
+
@param repeatEvery <float> Default 2.0 - After starting, the given exception is immediately raised. Then, every #repeatEvery seconds,
|
|
105
|
+
it is raised again, until the thread terminates.
|
|
106
|
+
'''
|
|
107
|
+
threading.Thread.__init__(self)
|
|
108
|
+
self.otherThread = otherThread
|
|
109
|
+
self.exception = exception
|
|
110
|
+
self.repeatEvery = repeatEvery
|
|
111
|
+
self.daemon = True
|
|
112
|
+
|
|
113
|
+
def run(self):
|
|
114
|
+
'''
|
|
115
|
+
run - The thread main. Will attempt to stop and join the attached thread.
|
|
116
|
+
'''
|
|
117
|
+
|
|
118
|
+
# Try to silence default exception printing.
|
|
119
|
+
self.otherThread._Thread__stderr = self._stderr
|
|
120
|
+
if hasattr(self.otherThread, '_Thread__stop'):
|
|
121
|
+
# If py2, call this first to start thread termination cleanly.
|
|
122
|
+
# Python3 does not need such ( nor does it provide.. )
|
|
123
|
+
self.otherThread._Thread__stop()
|
|
124
|
+
while self.otherThread.is_alive():
|
|
125
|
+
# We loop raising exception incase it's caught hopefully this breaks us far out.
|
|
126
|
+
ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(self.otherThread.ident), ctypes.py_object(self.exception))
|
|
127
|
+
self.otherThread.join(self.repeatEvery)
|
|
128
|
+
|
|
129
|
+
try:
|
|
130
|
+
self._stderr.close()
|
|
131
|
+
except:
|
|
132
|
+
pass
|
|
133
|
+
|
|
134
|
+
# vim: set ts=4 sw=4 expandtab :
|
|
File without changes
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
|
|
2
|
+
# vim: set ts=4 sw=4 expandtab :
|
|
3
|
+
|
|
4
|
+
'''
|
|
5
|
+
Copyright (c) 2016, 2017 Tim Savannah All Rights Reserved.
|
|
6
|
+
|
|
7
|
+
Licensed under the Lesser GNU Public License Version 3, LGPLv3. You should have recieved a copy of this with the source distribution as
|
|
8
|
+
LICENSE, otherwise it is available at https://github.com/kata198/func_timeout/LICENSE
|
|
9
|
+
'''
|
|
10
|
+
|
|
11
|
+
import copy
|
|
12
|
+
import functools
|
|
13
|
+
import inspect
|
|
14
|
+
import threading
|
|
15
|
+
import time
|
|
16
|
+
import types
|
|
17
|
+
import sys
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
from .exceptions import FunctionTimedOut
|
|
21
|
+
from .StoppableThread import StoppableThread
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
from .py3_raise import raise_exception
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
from functools import wraps
|
|
28
|
+
|
|
29
|
+
__all__ = ('func_timeout', 'func_set_timeout')
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def func_timeout(timeout, func, args=(), kwargs=None):
|
|
35
|
+
'''
|
|
36
|
+
func_timeout - Runs the given function for up to #timeout# seconds.
|
|
37
|
+
|
|
38
|
+
Raises any exceptions #func# would raise, returns what #func# would return (unless timeout is exceeded), in which case it raises FunctionTimedOut
|
|
39
|
+
|
|
40
|
+
@param timeout <float> - Maximum number of seconds to run #func# before terminating
|
|
41
|
+
|
|
42
|
+
@param func <function> - The function to call
|
|
43
|
+
|
|
44
|
+
@param args <tuple> - Any ordered arguments to pass to the function
|
|
45
|
+
|
|
46
|
+
@param kwargs <dict/None> - Keyword arguments to pass to the function.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
@raises - FunctionTimedOut if #timeout# is exceeded, otherwise anything #func# could raise will be raised
|
|
50
|
+
|
|
51
|
+
If the timeout is exceeded, FunctionTimedOut will be raised within the context of the called function every two seconds until it terminates,
|
|
52
|
+
but will not block the calling thread (a new thread will be created to perform the join). If possible, you should try/except FunctionTimedOut
|
|
53
|
+
to return cleanly, but in most cases it will 'just work'.
|
|
54
|
+
|
|
55
|
+
@return - The return value that #func# gives
|
|
56
|
+
'''
|
|
57
|
+
|
|
58
|
+
if not kwargs:
|
|
59
|
+
kwargs = {}
|
|
60
|
+
if not args:
|
|
61
|
+
args = ()
|
|
62
|
+
|
|
63
|
+
ret = []
|
|
64
|
+
exception = []
|
|
65
|
+
isStopped = False
|
|
66
|
+
|
|
67
|
+
from funboost.core.current_task import thread_current_task
|
|
68
|
+
|
|
69
|
+
def funcwrap(args2, kwargs2,):
|
|
70
|
+
# fct = thread_current_task
|
|
71
|
+
# fct.set_fct_context(fct_context) # 把funboost的消费线程上下文需要传递到超时线程上下文里面来.
|
|
72
|
+
try:
|
|
73
|
+
ret.append( func(*args2, **kwargs2) )
|
|
74
|
+
except FunctionTimedOut:
|
|
75
|
+
# Don't print traceback to stderr if we time out
|
|
76
|
+
pass
|
|
77
|
+
except BaseException as e:
|
|
78
|
+
exc_info = sys.exc_info()
|
|
79
|
+
if isStopped is False:
|
|
80
|
+
# Assemble the alternate traceback, excluding this function
|
|
81
|
+
# from the trace (by going to next frame)
|
|
82
|
+
# Pytohn3 reads native from __traceback__,
|
|
83
|
+
# python2 has a different form for "raise"
|
|
84
|
+
e.__traceback__ = exc_info[2].tb_next
|
|
85
|
+
exception.append( e )
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
# fct = funboost_current_task()
|
|
89
|
+
thread = StoppableThread(target=funcwrap, args=(args, kwargs,))
|
|
90
|
+
thread.daemon = True
|
|
91
|
+
|
|
92
|
+
thread.start()
|
|
93
|
+
thread.join(timeout)
|
|
94
|
+
|
|
95
|
+
stopException = None
|
|
96
|
+
if thread.is_alive():
|
|
97
|
+
isStopped = True
|
|
98
|
+
|
|
99
|
+
class FunctionTimedOutTempType(FunctionTimedOut):
|
|
100
|
+
def __init__(self):
|
|
101
|
+
return FunctionTimedOut.__init__(self, '', timeout, func, args, kwargs)
|
|
102
|
+
|
|
103
|
+
FunctionTimedOutTemp = type('FunctionTimedOut' + str( hash( "%d_%d_%d_%d" %(id(timeout), id(func), id(args), id(kwargs))) ), FunctionTimedOutTempType.__bases__, dict(FunctionTimedOutTempType.__dict__))
|
|
104
|
+
|
|
105
|
+
stopException = FunctionTimedOutTemp
|
|
106
|
+
# raise FunctionTimedOut('', timeout, func, args, kwargs)
|
|
107
|
+
thread._stopThread(stopException)
|
|
108
|
+
thread.join(min(.1, timeout / 50.0))
|
|
109
|
+
raise FunctionTimedOut('', timeout, func, args, kwargs)
|
|
110
|
+
else:
|
|
111
|
+
# We can still cleanup the thread here..
|
|
112
|
+
# Still give a timeout... just... cuz..
|
|
113
|
+
thread.join(.5)
|
|
114
|
+
|
|
115
|
+
if exception:
|
|
116
|
+
raise_exception(exception)
|
|
117
|
+
|
|
118
|
+
if ret:
|
|
119
|
+
return ret[0]
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def func_set_timeout(timeout, allowOverride=False):
|
|
123
|
+
'''
|
|
124
|
+
func_set_timeout - Decorator to run a function with a given/calculated timeout (max execution time).
|
|
125
|
+
Optionally (if #allowOverride is True), adds a paramater, "forceTimeout", to the
|
|
126
|
+
function which, if provided, will override the default timeout for that invocation.
|
|
127
|
+
|
|
128
|
+
If #timeout is provided as a lambda/function, it will be called
|
|
129
|
+
prior to each invocation of the decorated function to calculate the timeout to be used
|
|
130
|
+
for that call, based on the arguments passed to the decorated function.
|
|
131
|
+
|
|
132
|
+
For example, you may have a "processData" function whose execution time
|
|
133
|
+
depends on the number of "data" elements, so you may want a million elements to have a
|
|
134
|
+
much higher timeout than seven elements.)
|
|
135
|
+
|
|
136
|
+
If #allowOverride is True AND a kwarg of "forceTimeout" is passed to the wrapped function, that timeout
|
|
137
|
+
will be used for that single call.
|
|
138
|
+
|
|
139
|
+
@param timeout <float OR lambda/function> -
|
|
140
|
+
|
|
141
|
+
**If float:**
|
|
142
|
+
Default number of seconds max to allow function to execute
|
|
143
|
+
before throwing FunctionTimedOut
|
|
144
|
+
|
|
145
|
+
**If lambda/function:
|
|
146
|
+
|
|
147
|
+
If a function/lambda is provided, it will be called for every
|
|
148
|
+
invocation of the decorated function (unless #allowOverride=True and "forceTimeout" was passed)
|
|
149
|
+
to determine the timeout to use based on the arguments to the decorated function.
|
|
150
|
+
|
|
151
|
+
The arguments as passed into the decorated function will be passed to this function.
|
|
152
|
+
They either must match exactly to what the decorated function has, OR
|
|
153
|
+
if you prefer to get the *args (list of ordered args) and **kwargs ( key : value keyword args form),
|
|
154
|
+
define your calculate function like:
|
|
155
|
+
|
|
156
|
+
def calculateTimeout(*args, **kwargs):
|
|
157
|
+
...
|
|
158
|
+
|
|
159
|
+
or lambda like:
|
|
160
|
+
|
|
161
|
+
calculateTimeout = lambda *args, **kwargs : ...
|
|
162
|
+
|
|
163
|
+
otherwise the args to your calculate function should match exactly the decorated function.
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
@param allowOverride <bool> Default False, if True adds a keyword argument to the decorated function,
|
|
167
|
+
"forceTimeout" which, if provided, will override the #timeout. If #timeout was provided as a lambda / function, it
|
|
168
|
+
will not be called.
|
|
169
|
+
|
|
170
|
+
@throws FunctionTimedOut If time alloted passes without function returning naturally
|
|
171
|
+
|
|
172
|
+
@see func_timeout
|
|
173
|
+
'''
|
|
174
|
+
# Try to be as efficent as possible... don't compare the args more than once
|
|
175
|
+
|
|
176
|
+
# Helps closure issue on some versions of python
|
|
177
|
+
defaultTimeout = copy.copy(timeout)
|
|
178
|
+
|
|
179
|
+
isTimeoutAFunction = bool( issubclass(timeout.__class__, (types.FunctionType, types.MethodType, types.LambdaType, types.BuiltinFunctionType, types.BuiltinMethodType) ) )
|
|
180
|
+
|
|
181
|
+
if not isTimeoutAFunction:
|
|
182
|
+
if not issubclass(timeout.__class__, (float, int)):
|
|
183
|
+
try:
|
|
184
|
+
timeout = float(timeout)
|
|
185
|
+
except:
|
|
186
|
+
raise ValueError('timeout argument must be a float/int for number of seconds, or a function/lambda which gets passed the function arguments and returns a calculated timeout (as float or int). Passed type: < %s > is not of any of these, and cannot be converted to a float.' %( timeout.__class__.__name__, ))
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
if not allowOverride and not isTimeoutAFunction:
|
|
190
|
+
# Only defaultTimeout provided. Simple function wrapper
|
|
191
|
+
def _function_decorator(func):
|
|
192
|
+
|
|
193
|
+
return wraps(func)(lambda *args, **kwargs : func_timeout(defaultTimeout, func, args=args, kwargs=kwargs))
|
|
194
|
+
|
|
195
|
+
# def _function_wrapper(*args, **kwargs):
|
|
196
|
+
# return func_timeout(defaultTimeout, func, args=args, kwargs=kwargs)
|
|
197
|
+
# return _function_wrapper
|
|
198
|
+
return _function_decorator
|
|
199
|
+
|
|
200
|
+
if not isTimeoutAFunction:
|
|
201
|
+
# allowOverride is True and timeout is not a function. Simple conditional on every call
|
|
202
|
+
def _function_decorator(func):
|
|
203
|
+
def _function_wrapper(*args, **kwargs):
|
|
204
|
+
if 'forceTimeout' in kwargs:
|
|
205
|
+
useTimeout = kwargs.pop('forceTimeout')
|
|
206
|
+
else:
|
|
207
|
+
useTimeout = defaultTimeout
|
|
208
|
+
|
|
209
|
+
return func_timeout(useTimeout, func, args=args, kwargs=kwargs)
|
|
210
|
+
|
|
211
|
+
return wraps(func)(_function_wrapper)
|
|
212
|
+
return _function_decorator
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
# At this point, timeout IS known to be a function.
|
|
216
|
+
timeoutFunction = timeout
|
|
217
|
+
|
|
218
|
+
if allowOverride:
|
|
219
|
+
# Could use a lambda here... but want traceback to highlight the calculate function,
|
|
220
|
+
# and not the invoked function
|
|
221
|
+
def _function_decorator(func):
|
|
222
|
+
def _function_wrapper(*args, **kwargs):
|
|
223
|
+
if 'forceTimeout' in kwargs:
|
|
224
|
+
useTimeout = kwargs.pop('forceTimeout')
|
|
225
|
+
else:
|
|
226
|
+
useTimeout = timeoutFunction(*args, **kwargs)
|
|
227
|
+
|
|
228
|
+
return func_timeout(useTimeout, func, args=args, kwargs=kwargs)
|
|
229
|
+
|
|
230
|
+
return wraps(func)(_function_wrapper)
|
|
231
|
+
return _function_decorator
|
|
232
|
+
|
|
233
|
+
# Cannot override, and calculate timeout function
|
|
234
|
+
def _function_decorator(func):
|
|
235
|
+
def _function_wrapper(*args, **kwargs):
|
|
236
|
+
useTimeout = timeoutFunction(*args, **kwargs)
|
|
237
|
+
|
|
238
|
+
return func_timeout(useTimeout, func, args=args, kwargs=kwargs)
|
|
239
|
+
|
|
240
|
+
return wraps(func)(_function_wrapper)
|
|
241
|
+
return _function_decorator
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
# vim: set ts=4 sw=4 expandtab :
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'''
|
|
2
|
+
Copyright (c) 2016 Tim Savannah All Rights Reserved.
|
|
3
|
+
|
|
4
|
+
Licensed under the Lesser GNU Public License Version 3, LGPLv3. You should have recieved a copy of this with the source distribution as
|
|
5
|
+
LICENSE, otherwise it is available at https://github.com/kata198/func_timeout/LICENSE
|
|
6
|
+
'''
|
|
7
|
+
|
|
8
|
+
__all__ = ('FunctionTimedOut', 'RETRY_SAME_TIMEOUT')
|
|
9
|
+
|
|
10
|
+
RETRY_SAME_TIMEOUT = 'RETRY_SAME_TIMEOUT'
|
|
11
|
+
|
|
12
|
+
class FunctionTimedOut(BaseException):
|
|
13
|
+
'''
|
|
14
|
+
FunctionTimedOut - Exception raised when a function times out
|
|
15
|
+
|
|
16
|
+
@property timedOutAfter - Number of seconds before timeout was triggered
|
|
17
|
+
|
|
18
|
+
@property timedOutFunction - Function called which timed out
|
|
19
|
+
@property timedOutArgs - Ordered args to function
|
|
20
|
+
@property timedOutKwargs - Keyword args to function
|
|
21
|
+
|
|
22
|
+
@method retry - Retries the function with same arguments, with option to run with original timeout, no timeout, or a different
|
|
23
|
+
explicit timeout. @see FunctionTimedOut.retry
|
|
24
|
+
'''
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def __init__(self, msg='', timedOutAfter=None, timedOutFunction=None, timedOutArgs=None, timedOutKwargs=None):
|
|
28
|
+
'''
|
|
29
|
+
__init__ - Create this exception type.
|
|
30
|
+
|
|
31
|
+
You should not need to do this outside of testing, it will be created by the func_timeout API
|
|
32
|
+
|
|
33
|
+
@param msg <str> - A predefined message, otherwise we will attempt to generate one from the other arguments.
|
|
34
|
+
|
|
35
|
+
@param timedOutAfter <None/float> - Number of seconds before timing-out. Filled-in by API, None will produce "Unknown"
|
|
36
|
+
|
|
37
|
+
@param timedOutFunction <None/function> - Reference to the function that timed-out. Filled-in by API." None will produce "Unknown Function"
|
|
38
|
+
|
|
39
|
+
@param timedOutArgs <None/tuple/list> - List of fixed-order arguments ( *args ), or None for no args.
|
|
40
|
+
|
|
41
|
+
@param timedOutKwargs <None/dict> - Dict of keyword arg ( **kwargs ) names to values, or None for no kwargs.
|
|
42
|
+
|
|
43
|
+
'''
|
|
44
|
+
|
|
45
|
+
self.timedOutAfter = timedOutAfter
|
|
46
|
+
|
|
47
|
+
self.timedOutFunction = timedOutFunction
|
|
48
|
+
self.timedOutArgs = timedOutArgs
|
|
49
|
+
self.timedOutKwargs = timedOutKwargs
|
|
50
|
+
|
|
51
|
+
if not msg:
|
|
52
|
+
msg = self.getMsg()
|
|
53
|
+
|
|
54
|
+
BaseException.__init__(self, msg)
|
|
55
|
+
|
|
56
|
+
self.msg = msg
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def getMsg(self):
|
|
60
|
+
'''
|
|
61
|
+
getMsg - Generate a default message based on parameters to FunctionTimedOut exception'
|
|
62
|
+
|
|
63
|
+
@return <str> - Message
|
|
64
|
+
'''
|
|
65
|
+
# Try to gather the function name, if available.
|
|
66
|
+
# If it is not, default to an "unknown" string to allow default instantiation
|
|
67
|
+
if self.timedOutFunction is not None:
|
|
68
|
+
timedOutFuncName = self.timedOutFunction.__name__
|
|
69
|
+
else:
|
|
70
|
+
timedOutFuncName = 'Unknown Function'
|
|
71
|
+
if self.timedOutAfter is not None:
|
|
72
|
+
timedOutAfterStr = "%f" %(self.timedOutAfter, )
|
|
73
|
+
else:
|
|
74
|
+
timedOutAfterStr = "Unknown"
|
|
75
|
+
|
|
76
|
+
return 'Function %s (args=%s) (kwargs=%s) timed out after %s seconds.\n' %(timedOutFuncName, repr(self.timedOutArgs), repr(self.timedOutKwargs), timedOutAfterStr)
|
|
77
|
+
|
|
78
|
+
def retry(self, timeout=RETRY_SAME_TIMEOUT):
|
|
79
|
+
'''
|
|
80
|
+
retry - Retry the timed-out function with same arguments.
|
|
81
|
+
|
|
82
|
+
@param timeout <float/RETRY_SAME_TIMEOUT/None> Default RETRY_SAME_TIMEOUT
|
|
83
|
+
|
|
84
|
+
If RETRY_SAME_TIMEOUT : Will retry the function same args, same timeout
|
|
85
|
+
If a float/int : Will retry the function same args with provided timeout
|
|
86
|
+
If None : Will retry function same args no timeout
|
|
87
|
+
|
|
88
|
+
@return - Returnval from function
|
|
89
|
+
'''
|
|
90
|
+
if timeout is None:
|
|
91
|
+
return self.timedOutFunction(*(self.timedOutArgs), **self.timedOutKwargs)
|
|
92
|
+
|
|
93
|
+
from .dafunc import func_timeout
|
|
94
|
+
|
|
95
|
+
if timeout == RETRY_SAME_TIMEOUT:
|
|
96
|
+
timeout = self.timedOutAfter
|
|
97
|
+
|
|
98
|
+
return func_timeout(timeout, self.timedOutFunction, args=self.timedOutArgs, kwargs=self.timedOutKwargs)
|