# Path: forsun/forsun.py
# class Forsun(object):
#     def __init__(self):
#     def init(self):
#     def uninit(self):
#     def init_extensions(self):
#     def retry_plan(self, plan):
#     def execute_action(self, ts, plan, status_expried):
#     def check_plan(self, ts, plan):
#     def handler_plan_expried(self, ts, key):
#     def handler_expried(self, ts):
#     def handler_plan(self, ts, key, status_expried):
#     def handler(self, ts):
#     def check(self, ts):
#                 def check_last(self, current_time, ts):
#     def time_out(self, ts):
#     def create_plan(self, plan):
#     def remove_plan(self, key):
#     def get_pan(self, key):
#     def get_keys(self, prefix=""):
#     def get_current_time(self):
#     def get_time_plans(self, ts):
#     def serve(self, callback = None):
#             def init():
#     def exit(self, callback = None):
#         def on_exit():
# 
# Path: forsun/utils.py
#     def ensure_bytes(s):
#     def ensure_unicode(s):
#     def ensure_bytes(s):
#     def ensure_unicode(s):
# def load_extensions(name):
# def parse_cmd(command, parse_kwargs = True, split_cmd = True):
# class ExtensionsNotFound(Exception): pass


import os
import sys
import argparse
import multiprocessing
import atexit
from ..forsun import config
from ..utils import is_py3
        from ..forsun import Forsun
            from ..forsun import Forsun
    if args.log_level:
        config.set("LOG_LEVEL", args.log_level)

    if args.bind_host:
        config.set("BIND_ADDRESS", args.bind_host)
    if args.bind_port:
        config.set("PORT", args.bind_port)
    if args.http_bind:
        config.set("HTTP_BIND", args.http_bind)

    if args.driver:
        config.set("STORE_DRIVER", args.driver)
    if args.store_mem_store_file:
        config.set("STORE_MEM_STORE_FILE", args.store_mem_store_file)
    if args.driver_redis_host:
        config.set("STORE_REDIS_HOST", args.driver_redis_host)
    if args.driver_redis_port:
        config.set("STORE_REDIS_PORT", args.driver_redis_port)
    if args.driver_redis_db:
        config.set("STORE_REDIS_DB", args.driver_redis_db)
    if args.driver_redis_password:
        config.set("STORE_REDIS_PASSWORD", args.driver_redis_password)
    if args.driver_redis_prefix:
        config.set("STORE_REDIS_PREFIX", args.driver_redis_prefix)
    if args.driver_redis_server_id:
        config.set("STORE_REDIS_SERVER_ID", args.driver_redis_server_id)

    if args.extension_path:
        config.set("EXTENSION_PATH", args.extension_path)
    if args.extensions:

# Path: forsun/forsun.py
# class Forsun(object):
#     def __init__(self):
#     def init(self):
#     def uninit(self):
#     def init_extensions(self):
#     def retry_plan(self, plan):
#     def execute_action(self, ts, plan, status_expried):
#     def check_plan(self, ts, plan):
#     def handler_plan_expried(self, ts, key):
#     def handler_expried(self, ts):
#     def handler_plan(self, ts, key, status_expried):
#     def handler(self, ts):
#     def check(self, ts):
#                 def check_last(self, current_time, ts):
#     def time_out(self, ts):
#     def create_plan(self, plan):
#     def remove_plan(self, key):
#     def get_pan(self, key):
#     def get_keys(self, prefix=""):
#     def get_current_time(self):
#     def get_time_plans(self, ts):
#     def serve(self, callback = None):
#             def init():
#     def exit(self, callback = None):
#         def on_exit():
# 
# Path: forsun/utils.py
#     def ensure_bytes(s):
#     def ensure_unicode(s):
#     def ensure_bytes(s):
#     def ensure_unicode(s):
# def load_extensions(name):
# def parse_cmd(command, parse_kwargs = True, split_cmd = True):
# class ExtensionsNotFound(Exception): pass


# Path: forsun/scripts/forsund.py
import os
import sys
import argparse
import multiprocessing
import atexit
from ..forsun import config
from ..utils import is_py3
        from ..forsun import Forsun
            from ..forsun import Forsun

    if args.log_level:
        config.set("LOG_LEVEL", args.log_level)

    if args.bind_host:
        config.set("BIND_ADDRESS", args.bind_host)
    if args.bind_port:
        config.set("PORT", args.bind_port)
    if args.http_bind:
        config.set("HTTP_BIND", args.http_bind)

    if args.driver:
        config.set("STORE_DRIVER", args.driver)
    if args.store_mem_store_file:
        config.set("STORE_MEM_STORE_FILE", args.store_mem_store_file)
    if args.driver_redis_host:
        config.set("STORE_REDIS_HOST", args.driver_redis_host)
    if args.driver_redis_port:
        config.set("STORE_REDIS_PORT", args.driver_redis_port)
    if args.driver_redis_db:
        config.set("STORE_REDIS_DB", args.driver_redis_db)
    if args.driver_redis_password:
        config.set("STORE_REDIS_PASSWORD", args.driver_redis_password)
    if args.driver_redis_prefix:
        config.set("STORE_REDIS_PREFIX", args.driver_redis_prefix)
    if args.driver_redis_server_id:
        config.set("STORE_REDIS_SERVER_ID", args.driver_redis_server_id)

    if args.extension_path:
        config.set("EXTENSION_PATH", args.extension_path)
    if args.extensions:

        config.set("EXTENSIONS", args.extensions)