Skip to content

Commit

Permalink
Migrate the jobs plugin server code to Girder 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeezley committed Jan 20, 2018
1 parent 56c0330 commit 71223fb
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 11 deletions.
Expand Up @@ -20,6 +20,8 @@
import importlib

from girder import events
from girder.plugin import GirderPlugin

from . import constants, job_rest


Expand All @@ -43,6 +45,7 @@ def scheduleLocal(event):
fn(job)


def load(info):
info['apiRoot'].job = job_rest.Job()
events.bind('jobs.schedule', 'jobs', scheduleLocal)
class JobsPlugin(GirderPlugin):
def load(self, info):
info['apiRoot'].job = job_rest.Job()
events.bind('jobs.schedule', 'jobs', scheduleLocal)
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -28,7 +28,7 @@
from girder.models.notification import Notification
from girder.models.token import Token
from girder.models.user import User
from girder.plugins.jobs.constants import JobStatus, JOB_HANDLER_LOCAL
from girder_jobs.constants import JobStatus, JOB_HANDLER_LOCAL


class Job(AccessControlledModel):
Expand Down
7 changes: 0 additions & 7 deletions plugins/jobs/plugin.yml

This file was deleted.

50 changes: 50 additions & 0 deletions plugins/jobs/setup.py
@@ -0,0 +1,50 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

###############################################################################
# Copyright 2013 Kitware Inc.
#
# Licensed under the Apache License, Version 2.0 ( the "License" );
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
###############################################################################

from setuptools import setup, find_packages


# perform the install
setup(
name='girder-jobs',
version='3.0.0',
description='A general purpose plugin for managing offline jobs.',
author='Kitware, Inc.',
author_email='kitware@kitware.com',
url='http://girder.readthedocs.io/en/latest/plugins.html#jobs',
license='Apache 2.0',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5'
],
packages=find_packages(),
install_requires=['girder'],
entry_points={
'girder.plugin': [
'jobs = girder_jobs:JobsPlugin'
]
}
)

0 comments on commit 71223fb

Please sign in to comment.