예제 #1
0
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
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
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()