コード例 #1
0
ファイル: rqworker.py プロジェクト: fucknoob/WebSemantic
def parse_args():
    parser = argparse.ArgumentParser(description='Starts an RQ worker.')
    add_standard_arguments(parser)

    parser.add_argument('--burst',
                        '-b',
                        action='store_true',
                        default=False,
                        help='Run in burst mode (quit after all work is done)')
    parser.add_argument('--name',
                        '-n',
                        default=None,
                        help='Specify a different name')
    parser.add_argument('--path',
                        '-P',
                        default='.',
                        help='Specify the import path.')
    parser.add_argument('--verbose',
                        '-v',
                        action='store_true',
                        default=False,
                        help='Show more output')
    parser.add_argument('queues',
                        nargs='*',
                        default=['default'],
                        help='The queues to listen on (default: \'default\')')

    return parser.parse_args()
コード例 #2
0
ファイル: rqworker.py プロジェクト: vasudevram/rq
def parse_args():
    parser = argparse.ArgumentParser(description='Starts an RQ worker.')
    add_standard_arguments(parser)

    parser.add_argument(
        '--burst',
        '-b',
        action='store_true',
        default=False,
        help='Run in burst mode (quit after all work is done)')  # noqa
    parser.add_argument('--name',
                        '-n',
                        default=None,
                        help='Specify a different name')
    parser.add_argument('--worker-class',
                        '-w',
                        action='store',
                        default='rq.Worker',
                        help='RQ Worker class to use')
    parser.add_argument('--job-class',
                        '-j',
                        action='store',
                        default='rq.job.Job',
                        help='RQ Job class to use')
    parser.add_argument('--path',
                        '-P',
                        default='.',
                        help='Specify the import path.')
    parser.add_argument('--results-ttl',
                        default=None,
                        help='Default results timeout to be used')
    parser.add_argument('--worker-ttl',
                        type=int,
                        default=None,
                        help='Default worker timeout to be used')
    parser.add_argument('--verbose',
                        '-v',
                        action='store_true',
                        default=False,
                        help='Show more output')
    parser.add_argument('--quiet',
                        '-q',
                        action='store_true',
                        default=False,
                        help='Show less output')
    parser.add_argument('--sentry-dsn',
                        action='store',
                        default=None,
                        metavar='URL',
                        help='Report exceptions to this Sentry DSN')  # noqa
    parser.add_argument(
        '--pid',
        action='store',
        default=None,
        help='Write the process ID number to a file at the specified path')
    parser.add_argument('queues',
                        nargs='*',
                        help='The queues to listen on (default: \'default\')')

    return parser.parse_args()
コード例 #3
0
ファイル: rqinfo.py プロジェクト: johannth/rq
def setup_parser():
    parser = argparse.ArgumentParser(description="RQ command-line monitor.")
    add_standard_arguments(parser)
    parser.add_argument("--path", "-P", default=".", help="Specify the import path.")
    parser.add_argument(
        "--interval",
        "-i",
        metavar="N",
        type=float,
        default=2.5,
        help="Updates stats every N seconds (default: don't poll)",
    )
    parser.add_argument(
        "--raw", "-r", action="store_true", default=False, help="Print only the raw numbers, no bar charts"
    )
    parser.add_argument(
        "--only-queues", "-Q", dest="only_queues", default=False, action="store_true", help="Show only queue info"
    )
    parser.add_argument(
        "--only-workers", "-W", dest="only_workers", default=False, action="store_true", help="Show only worker info"
    )
    parser.add_argument(
        "--by-queue", "-R", dest="by_queue", default=False, action="store_true", help="Shows workers by queue"
    )
    parser.add_argument("queues", nargs="*", help="The queues to poll")
    return parser
コード例 #4
0
ファイル: rqinfo.py プロジェクト: AbdAllah-Ahmed/rq
def parse_args():
    parser = argparse.ArgumentParser(description='RQ command-line monitor.')
    add_standard_arguments(parser)
    parser.add_argument('--path', '-P', default='.', help='Specify the import path.')
    parser.add_argument('--interval', '-i', metavar='N', type=float, default=2.5, help='Updates stats every N seconds (default: don\'t poll)')
    parser.add_argument('--raw', '-r', action='store_true', default=False, help='Print only the raw numbers, no bar charts')
    parser.add_argument('--only-queues', '-Q', dest='only_queues', default=False, action='store_true', help='Show only queue info')
    parser.add_argument('--only-workers', '-W', dest='only_workers', default=False, action='store_true', help='Show only worker info')
    parser.add_argument('--by-queue', '-R', dest='by_queue', default=False, action='store_true', help='Shows workers by queue')
    parser.add_argument('queues', nargs='*', help='The queues to poll')
    return parser.parse_args()
コード例 #5
0
ファイル: rqworker.py プロジェクト: ShriramK/rq
def parse_args():
    parser = argparse.ArgumentParser(description='Starts an RQ worker.')
    add_standard_arguments(parser)

    parser.add_argument('--burst', '-b', action='store_true', default=False, help='Run in burst mode (quit after all work is done)')
    parser.add_argument('--name', '-n', default=None, help='Specify a different name')
    parser.add_argument('--path', '-P', default='.', help='Specify the import path.')
    parser.add_argument('--verbose', '-v', action='store_true', default=False, help='Show more output')
    parser.add_argument('queues', nargs='*', default=['default'], help='The queues to listen on (default: \'default\')')

    return parser.parse_args()
コード例 #6
0
ファイル: rqinfo.py プロジェクト: wangzijian0x7C6/rq
def parse_args():
    parser = argparse.ArgumentParser(description='RQ command-line monitor.')
    add_standard_arguments(parser)
    parser.add_argument('--path', '-P', default='.', help='Specify the import path.')
    parser.add_argument('--interval', '-i', metavar='N', type=float, default=2.5, help='Updates stats every N seconds (default: don\'t poll)')  # noqa
    parser.add_argument('--raw', '-r', action='store_true', default=False, help='Print only the raw numbers, no bar charts')  # noqa
    parser.add_argument('--only-queues', '-Q', dest='only_queues', default=False, action='store_true', help='Show only queue info')  # noqa
    parser.add_argument('--only-workers', '-W', dest='only_workers', default=False, action='store_true', help='Show only worker info')  # noqa
    parser.add_argument('--by-queue', '-R', dest='by_queue', default=False, action='store_true', help='Shows workers by queue')  # noqa
    parser.add_argument('--empty-failed-queue', '-X', dest='empty_failed_queue', default=False, action='store_true', help='Empties the failed queue, then quits')  # noqa
    parser.add_argument('queues', nargs='*', help='The queues to poll')
    return parser.parse_args()
コード例 #7
0
ファイル: rqworker.py プロジェクト: johannth/rq
def setup_parser():
    parser = argparse.ArgumentParser(description='Starts an RQ worker.')
    add_standard_arguments(parser)

    parser.add_argument('--burst', '-b', action='store_true', default=False, help='Run in burst mode (quit after all work is done)')
    parser.add_argument('--name', '-n', default=None, help='Specify a different name')
    parser.add_argument('--path', '-P', default='.', help='Specify the import path.')
    parser.add_argument('--verbose', '-v', action='store_true', default=False, help='Show more output')
    parser.add_argument('--quiet', '-q', action='store_true', default=False, help='Show less output')
    parser.add_argument('--sentry-dsn', action='store', default=None, metavar='URL', help='Report exceptions to this Sentry DSN')
    parser.add_argument('queues', nargs='*', help='The queues to listen on (default: \'default\')')

    return parser
コード例 #8
0
ファイル: rqretryworker.py プロジェクト: yf225/Wasup-server
def parse_args():
    parser = argparse.ArgumentParser(description='Starts an RQ worker.')
    add_standard_arguments(parser)

    parser.add_argument('--burst', '-b', action='store_true', default=False, help='Run in burst mode (quit after all work is done)')  # noqa
    parser.add_argument('--name', '-n', default=None, help='Specify a different name')
    parser.add_argument('--worker-class', '-w', action='store', default='rq.Worker', help='RQ Worker class to use')
    parser.add_argument('--path', '-P', default='.', help='Specify the import path.')
    parser.add_argument('--results-ttl', default=None, help='Default results timeout to be used')
    parser.add_argument('--worker-ttl', default=None, help='Default worker timeout to be used')
    parser.add_argument('--verbose', '-v', action='store_true', default=False, help='Show more output')
    parser.add_argument('--quiet', '-q', action='store_true', default=False, help='Show less output')
    parser.add_argument('--sentry-dsn', action='store', default=None, metavar='URL', help='Report exceptions to this Sentry DSN')  # noqa
    parser.add_argument('--pid', action='store', default=None,
                        help='Write the process ID number to a file at the specified path')
    parser.add_argument('queues', nargs='*', help='The queues to listen on (default: \'default\')')

    return parser.parse_args()
コード例 #9
0
ファイル: rqworker.py プロジェクト: ronaldevers/rq
def parse_args():
    parser = argparse.ArgumentParser(description="Starts an RQ worker.")
    add_standard_arguments(parser)

    parser.add_argument(
        "--burst", "-b", action="store_true", default=False, help="Run in burst mode (quit after all work is done)"
    )  # noqa
    parser.add_argument("--name", "-n", default=None, help="Specify a different name")
    parser.add_argument("--worker-class", "-w", action="store", default="rq.Worker", help="RQ Worker class to use")
    parser.add_argument("--path", "-P", default=".", help="Specify the import path.")
    parser.add_argument("--results-ttl", default=None, help="Default results timeout to be used")
    parser.add_argument("--worker-ttl", default=None, help="Default worker timeout to be used")
    parser.add_argument("--verbose", "-v", action="store_true", default=False, help="Show more output")
    parser.add_argument("--quiet", "-q", action="store_true", default=False, help="Show less output")
    parser.add_argument(
        "--sentry-dsn", action="store", default=None, metavar="URL", help="Report exceptions to this Sentry DSN"
    )  # noqa
    parser.add_argument(
        "--pid", action="store", default=None, help="Write the process ID number to a file at the specified path"
    )
    parser.add_argument("queues", nargs="*", help="The queues to listen on (default: 'default')")

    return parser.parse_args()