-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build a Job class #37
Comments
Good idea. I like specially abstraction. I have a pattern that I use with YAML files and some boilerplate code for encryption (simple base64 by default, but with support to Amazon KMS too). When vacation is over (February hooray! 🎉 ) I will file an issue for that. But having a Job class could be useful for that too, so my +1 |
Maybe try to add loading and passing through settings in a unified way too. This way we might prevent a lot of copy pastes and hardcoded configuration in the jobs, making them less re-useable |
@vStone the way I'm configuring my jobs now is with a dashboard.yml file or similar in the top level. e.g. (writing without testing the syntax):
I will have access to the working dashboard in one week and will update the ticket with the complete set up. But basically, each job imports an utility class (that could be part of smashing core if others find it useful) and this class has the methods to parse the YAML. |
can you use the dashing jobs generator with smashing? |
@JoshuaEdwards1991 what do you mean by using the dashing jobs generator with smashing? At this point, Dashing and Smashing are quite similar so you should be able to generate jobs using Smashing, just as you would in Dashing. |
Currently, jobs are a ruby file that invoke Rufus scheduler directly and then call
send_event
. It would be much better for many reasons if there was a superclass which users could subclass. The subclass would be responsible for providing the implementation for a 'run' method which would return a value to the caller.Benefits:
The text was updated successfully, but these errors were encountered: