1.`export serverIp = xxx export serverPort = xxx`
2.schedulerplus_client.conf
```
[schedulerplus_client]
zk_url = localhost:2181
schedulerplus_url = localhost:8888
job_group = demogroup
```
3.demo_executor.py
```python
from schedulerplus.client.job_executor import JobExecutor
from schedulerplus.client.job_code_messages import *
class DemoExecutor(JobExecutor):
def execute(self, external_data):
print external_data
return SUCCESS_CODE, SUCCESS_MESSAGE
```
4.web_main.py
```python
import cherrypy
from schedulerplus.client.config import Config
Config.instance().load("xxx")
from schedulerplus.client.job_dispatcher import JobDispatcher
from schedulerplus.client.job_register import JobRegister
from demo.demo_executor import DemoExecutor
class JobDispatchController(object):
job_dispatcher = JobDispatcher()
@cherrypy.expose
@cherrypy.tools.json_in()
def dispatch(self):
form = cherrypy.request.json
self.job_dispatcher.dispatch(form)
if __name__ == "__main__":
JobRegister.instance().register("demo", DemoExecutor())
cherrypy.quickstart(JobDispatchController())
```
Metadata
Release files for schedulerplus-client 0.0.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| schedulerplus-client-0.0.16.tar.gz | 5.9 kB | Without provenance | Details for schedulerplus-client-0.0.16.tar.gz |
Release files / schedulerplus-client-0.0.16.tar.gz
| Download URL | schedulerplus-client-0.0.16.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8c2109c0db160a2333c1227704c942f123b896e0e34ff66b2eb39d5f63db886
|
|
BLAKE2b-256 checksum How to use checksums |
ab9b8828bde6f0ee1420d0bb731ffd0f815bcf885276d954fd00b7cba2e9cb2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for schedulerplus-client 0.0.16
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.