Skip to content

Commit

Permalink
fix(queenbee): upgrade to [email protected]
Browse files Browse the repository at this point in the history
This also requires an upgrade of queenbee to match the version currently running on the server
  • Loading branch information
AntoineDao committed Jan 25, 2021
1 parent 76a1187 commit af6725a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions queenbee_pollination/cli/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ def delete_artifacts(project, owner, path):
print("Poof... All gone!")


@project.group('job')
def job():
@project.group('run')
def run():
pass


@job.command('submit')
@run.command('submit')
@click.argument('job_file', type=click.Path(exists=True))
@click.option('-p', '--project', help='project name', type=str, required=True)
@click.option('-o', '--owner', help='a pollination account name')
Expand All @@ -237,7 +237,7 @@ def submit(project, owner, job_file):
job = Job.from_file(job_file)

try:
res = client.jobs.create_job(
res = client.runs.create_run(
owner=owner,
name=project,
job=job.dict(),
Expand All @@ -249,12 +249,12 @@ def submit(project, owner, job_file):



@job.command('list')
@run.command('list')
@click.option('-p', '--project', type=str, required=True)
@click.option('-o', '--owner', help='a pollination account name')
@click.option('--page', type=int, default=1, show_default=True)
def list_jobs(project, owner, page):
"""List jobs for a given project"""
def list_runs(project, owner, page):
"""List runs for a given project"""

ctx = click.get_current_context()
client = ctx.obj.get_client()
Expand All @@ -264,7 +264,7 @@ def list_jobs(project, owner, page):
owner = account.username

try:
res = client.jobs.list_jobs(
res = client.runs.list_runs(
owner=owner,
name=project,
page=page,
Expand Down
2 changes: 1 addition & 1 deletion queenbee_pollination/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self, api_token=None, access_token=None, host='https://api.pollinat
self.auth = sdk.UserApi(sdk.ApiClient(config))
self.recipes = sdk.RecipesApi(sdk.ApiClient(config))
self.plugins = sdk.PluginsApi(sdk.ApiClient(config))
self.jobs = sdk.JobsApi(sdk.ApiClient(config))
self.runs = sdk.RunsApi(sdk.ApiClient(config))
self.artifacts = sdk.ArtifactsApi(sdk.ApiClient(config))
self.projects = sdk.ProjectsApi(sdk.ApiClient(config))

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
queenbee==1.22.1
pollination-sdk==0.10.12
queenbee>=1.22.13
pollination-sdk==0.10.17
tabulate==0.8.7
requests==2.24.0

0 comments on commit af6725a

Please sign in to comment.