Changeset View
Changeset View
Standalone View
Standalone View
swh/scheduler/api/client.py
# Copyright (C) 2018 The Software Heritage developers | # Copyright (C) 2018 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
from swh.core.api import SWHRemoteAPI | from swh.core.api import RPCClient | ||||
class RemoteScheduler(SWHRemoteAPI): | class RemoteScheduler(RPCClient): | ||||
"""Proxy to a remote scheduler API | """Proxy to a remote scheduler API | ||||
""" | """ | ||||
def close_connection(self): | def close_connection(self): | ||||
return self.post('close_connection', {}) | return self.post('close_connection', {}) | ||||
def set_status_tasks(self, task_ids, status='disabled', next_run=None): | def set_status_tasks(self, task_ids, status='disabled', next_run=None): | ||||
return self.post('set_status_tasks', dict( | return self.post('set_status_tasks', dict( | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |