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

Rename CentralPlannerScheduler to Scheduler #1781

Merged
merged 1 commit into from
Jul 25, 2016

Conversation

Tarrasch
Copy link
Contributor

@Tarrasch Tarrasch commented Jul 22, 2016

Description

Rename CentralPlannerScheduler to Scheduler

Motivation and Context

I find very little value in having that complicated name. In particular
it should be clear that the main class of scheduler.py is in fact
the Scheduler() class.

I've also renamed the tests testing the api to
test/scheduler_api_test.py. This should feel more intuitive to have
"scheduler" in the name of the file

Have you tested this? If so, how?

I rely on Travis for this. I could try this in production before merging to, just in case. :)

I find very little value in having that complicated name. In particular
it should be clear that the main class of scheduler.py is in fact
the Scheduler() class.

I've also renamed the tests testing the api to
test/scheduler_api_test.py. This should feel more intuitive to have
"scheduler" in the name of the file.
@@ -247,7 +247,7 @@ def run(api_port=8082, address=None, unix_socket=None, scheduler=None, responder
Runs one instance of the API server.
"""
if scheduler is None:
scheduler = CentralPlannerScheduler()
scheduler = Scheduler()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This kind of code is more readable IMO, requires no brain cycles to process anymore.

@erikbern
Copy link
Contributor

lgtm

@Tarrasch Tarrasch merged commit e02ba97 into spotify:master Jul 25, 2016
@Tarrasch Tarrasch deleted the simplify_scheduler branch July 25, 2016 03:30
p7k pushed a commit to Celmatix/luigi that referenced this pull request Jul 28, 2016
* spotify/master: (24 commits)
  Add DateSecondParameter to parameter.py (spotify#1779)
  tox: Specify sphinx dependency better
  flake8: Unbreak travis build
  Excludes .tox from flake8 to prevent checking third-party libraries (spotify#1785)
  README: Remove monthly downloads badge
  Rename CentralPlannerScheduler to Scheduler (spotify#1781)
  Remove abstract Scheduler class (spotify#1778)
  Assistants: Don't affect longevity of tasks (spotify#1772)
  tests: Skip a inttermittently failing s3 test (spotify#1777)
  Update retcodes to handle new cases (spotify#1771)
  tests: Fix warning in remote_scheduler_test.py (spotify#1774)
  Remove sitecustomize file (spotify#1755)
  Fix exist method for ftp server
  Update copy() to return number and size of files copied
  Remove the confusing "dummy_test_module" directory (spotify#1756)
  Disable codecov comments on GitHub PRs (spotify#1754)
  Fix "owner_email" log message. (spotify#1762)
  docs: Install sphinx 1.4.4 in setup.py (spotify#1761)
  docs: Set minimum versions for sphinx (spotify#1760)
  Normalize ListParameter to be Immutable (spotify#1759)
  ...
This was referenced Jun 29, 2022
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