Skip to content
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

Provide access to schedule to allow spec phase tests #40

Conversation

hlascelles
Copy link
Owner

This allows programmatic access to the loaded and parsed schedule, which will allow a spec phase check of the configuration.

This will perform a variety of sanity checks and ensure that:

  1. The yml is present and valid
  2. The job classes exist and are descendants of Que::Job
  3. The cron fields are present and valid
  4. The queues (if present) are strings
  5. The priorities (if present) are integers
  6. The schedule_types are known
  describe 'check que_schedule.yml' do
   it 'loads the schedule from the default location' do
     expect(Que::Scheduler.schedule).not_to be nil
   end
 end

@fameoflight
Copy link

LGTM 💯

@hlascelles hlascelles force-pushed the provide-direct-access-to-the-schedule-and-demonstrate-spec branch from b01d614 to d4190e8 Compare August 1, 2018 22:17
@hlascelles hlascelles merged commit e43f04f into master Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants