diff options
| author | Pierre Tardy <tardyp@gmail.com> | 2018-02-05 15:55:11 +0100 |
|---|---|---|
| committer | Pierre Tardy <tardyp@gmail.com> | 2018-03-04 10:49:00 +0100 |
| commit | 3424333bc98fcfc4733f2c5f1bf9a93b9a02135b (patch) | |
| tree | 978ad66f1e18027d6e86ceeffa83e6a4ed08c474 /gitlab/v4 | |
| parent | 6bcc92a39a9a9dd97fa7387f754474c1cc5d78dc (diff) | |
| download | gitlab-3424333bc98fcfc4733f2c5f1bf9a93b9a02135b.tar.gz | |
introduce RefreshMixin
RefreshMixin allows to update a REST object so that you can poll on it.
This is mostly useful for pipelines and jobs, but could be set on most of other objects, with unknown usecases.
Diffstat (limited to 'gitlab/v4')
| -rw-r--r-- | gitlab/v4/objects.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index 16564e4..80a6ca5 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -909,7 +909,7 @@ class ProjectCustomAttributeManager(RetrieveMixin, SetMixin, DeleteMixin, _from_parent_attrs = {'project_id': 'id'} -class ProjectJob(RESTObject): +class ProjectJob(RESTObject, RefreshMixin): @cli.register_custom_action('ProjectJob') @exc.on_http_error(exc.GitlabJobCancelError) def cancel(self, **kwargs): @@ -1045,7 +1045,7 @@ class ProjectJobManager(RetrieveMixin, RESTManager): _from_parent_attrs = {'project_id': 'id'} -class ProjectCommitStatus(RESTObject): +class ProjectCommitStatus(RESTObject, RefreshMixin): pass @@ -1964,7 +1964,7 @@ class ProjectPipelineJobsManager(ListMixin, RESTManager): _list_filters = ('scope',) -class ProjectPipeline(RESTObject): +class ProjectPipeline(RESTObject, RefreshMixin): _managers = (('jobs', 'ProjectPipelineJobManager'), ) @cli.register_custom_action('ProjectPipeline') |
