Comments (8)
I created the stricyaml
branch with work on this, but I couldn't get it to work in the end. I am not impressed. I think I'll stick to normal yaml and jsonschema.
from yacron.
Thanks for trying. I'll take a look a bit later this evening and see if I can figure out what went wrong and issue a pull request.
From a cursory glance it looks pretty much exactly as I'd expect.
from yacron.
You simply missed out the Seq. Instead of::
jobs:
- name: test-01
command: echo "foobar" # runs with /bin/bash as shell
schedule: "*/5 * * * *"
- name: test-02 # runs with /bin/sh as shell
command: echo "zbr"
schedule: "*/5 * * * *"
It was expecting::
jobs:
name: test-01
command: echo "foobar" # runs with /bin/bash as shell
schedule: "*/5 * * * *"
from yacron.
Oh, wow, thanks for debugging! I was just confused I guess.
I'll play around with it some more, then.
from yacron.
Btw, I would like instead of
strictyaml.exceptions.YAMLValidationError: while parsing a mapping
unexpected key not in schema 'killTimeoutx'
in "<unicode string>", line 73, column 1:
killTimeoutx: '0.5'
^ (line: 73)
to display the correct file name instead of <unicode string>
. If you have any idea, would appreciate the tip. I'm doing this hack, but it feels dirty:
try:
doc = strictyaml.load(data, CONFIG_SCHEMA).data
except YAMLValidationError as ex:
if ex.context_mark is not None:
ex.context_mark.name = path
if ex.problem_mark is not None:
ex.problem_mark.name = path
raise
from yacron.
Fair point. I'm mulling over doing this::
try:
doc = strictyaml.load(data, CONFIG_SCHEMA, label=path).data
except YAMLValidationError as ex:
print(ex)
strictyaml.exceptions.YAMLValidationError: while parsing a mapping
unexpected key not in schema 'killTimeoutx'
in "/path/to/whatever.yaml", line 73, column 1:
killTimeoutx: '0.5'
^ (line: 73)
from yacron.
That could work, though perhaps it would be simpler to just give it a file name and let strictyaml open the file.
Are you designing this as a new API for strictyaml? Should we discuss in a new strictyaml issue, instead of this (closed) issue?
from yacron.
Raised: crdoconnor/strictyaml#26
Re: opening the file - no, I don't really want to do that. It opens up a whole new can of worms (encoding errors, various file system related exceptions, etc.) that I don't really want to become strictyaml's problem.
from yacron.
Related Issues (20)
- Cannot run the binary in alpine linux HOT 2
- Job is always executed immediately on yacron start HOT 2
- LD_LIBRARY_PATH env var is breaking curl commands to HTTPS url HOT 2
- correct way for curl command HOT 2
- executionTimeout and killTimeout not working HOT 1
- /etc/yacron.d is missing HOT 4
- Feature Request: activate / deactivate Jobs HOT 3
- Handling of schedule-entries not clear enough documented HOT 4
- Building yacron pyinstaller on newer python version fail HOT 3
- Propose: permanent tasks HOT 2
- Rollbar Support HOT 2
- A way to test schedules without running them HOT 3
- wish: timestamps for log outputs HOT 5
- Scheduled command failing when running with yacron HOT 1
- Great Jon HOT 1
- yacron not loading the .bashrc file at start HOT 1
- Specifying schedule outside YAML file HOT 1
- add support for smaller time units, like in Systemd timer or Monit HOT 2
- End of Support or End of Life dates for version 0.19
- cors HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yacron.