Verified Commit 4b3436e6 authored by Raphaël Bleuse's avatar Raphaël Bleuse
Browse files

Craft a minimal package for a scheduler plugin

parent cdfb0750
This diff is collapsed.
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "pybatsim-example"
version = "0.0.0"
description = "Example scheduler plugin for PyBatsim"
authors = []
packages = [
{include = "*.py"},
]
[tool.poetry.dependencies]
python = "^3.7.1"
pybatsim = {path = "../pybatsim-core", develop = true}
[tool.poetry.plugins."pybatsim.schedulers"]
rejector = "universal_rejection:UniversalRejectionScheduler"
"""
Trivial example scheduler that rejects any job.
No hard feelings!
"""
from pybatsim.batsim.batsim import BatsimScheduler
class UniversalRejectionScheduler(BatsimScheduler):
def onJobSubmission(self, job):
self.bs.reject_jobs([job]) # nope!
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment