예제 #1
0
파일: test_utils.py 프로젝트: jsargiot/shub
 def jri_result(follow):
     return list(utils.job_resource_iter(
         job,
         magic_iter,
         follow,
         key_func=lambda _: 456,
     ))
예제 #2
0
 def jri_result(follow, tail=None):
     return list(utils.job_resource_iter(
         job,
         job.resource,
         follow=follow,
         tail=tail,
         output_json=True,
     ))
예제 #3
0
def cli(job_id, follow, tail):
    job = get_job(job_id)
    for item in job_resource_iter(job,
                                  job.items,
                                  output_json=True,
                                  follow=follow,
                                  tail=tail):
        click.echo(item)
예제 #4
0
 def jri_result(follow):
     return list(
         utils.job_resource_iter(
             job,
             magic_iter,
             follow,
             key_func=lambda _: 456,
         ))
예제 #5
0
 def jri_result(follow, tail=None):
     return list(utils.job_resource_iter(
         job,
         job.resource,
         follow=follow,
         tail=tail,
         output_json=True,
     ))
예제 #6
0
파일: log.py 프로젝트: cans/shub
def cli(job_id, follow):
    job = get_job(job_id)
    for item in job_resource_iter(job,
                                  job.logs.iter_values,
                                  follow=follow,
                                  key_func=lambda item: item['_key']):
        click.echo("{} {} {}".format(
            datetime.utcfromtimestamp(item['time'] / 1000),
            logging.getLevelName(int(item['level'])), item['message']))
예제 #7
0
파일: log.py 프로젝트: scrapinghub/shub
def cli(job_id, follow, tail):
    job = get_job(job_id)
    for item in job_resource_iter(job, job.logs, follow=follow, tail=tail):
        click.echo(
            u"{} {} {}".format(
                datetime.utcfromtimestamp(item['time']/1000),
                logging.getLevelName(int(item['level'])),
                item['message']
            )
        )
예제 #8
0
def cli(job_id, follow, tail):
    job = get_job(job_id)
    for item in job_resource_iter(job, job.logs, follow=follow, tail=tail):
        click.echo(
            u"{} {} {}".format(
                datetime.utcfromtimestamp(item['time']/1000),
                logging.getLevelName(int(item['level'])),
                item['message']
            )
        )
예제 #9
0
파일: log.py 프로젝트: cans/shub
def cli(job_id, follow):
    job = get_job(job_id)
    for item in job_resource_iter(job, job.logs.iter_values, follow=follow,
                                  key_func=lambda item: item['_key']):
        click.echo(
            "{} {} {}".format(
                datetime.utcfromtimestamp(item['time']/1000),
                logging.getLevelName(int(item['level'])),
                item['message']
            )
        )
예제 #10
0
파일: items.py 프로젝트: bbotella/shub
def cli(job_id, follow):
    job = get_job(job_id)
    for item in job_resource_iter(job, job.items.iter_json, follow=follow):
        click.echo(item)
예제 #11
0
파일: requests.py 프로젝트: immerrr/shub
def cli(job_id, follow, tail):
    job = get_job(job_id)
    for item in job_resource_iter(job, job.requests, output_json=True,
                                  follow=follow, tail=tail):
        click.echo(item)
예제 #12
0
def cli(job_id, follow):
    job = get_job(job_id)
    for item in job_resource_iter(job, job.requests.iter_json, follow=follow):
        click.echo(item)