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

Fixed bug where the whenever_name was not getting set properly, causing multiple crontab entries. #335

Merged
merged 1 commit into from Sep 6, 2015

Conversation

ipd
Copy link
Contributor

@ipd ipd commented Sep 6, 2015

I ran into a problem where mina deployments were creating multiple crontab entries.

This was caused because our project's schedule.rb file sets the :domain key after requiring 'mina/whenever'. The code as written was using set_default to set the :whenever_name key at require time.

I refactored the code to use a lambda which uses the :whenever_name key if defined, otherwise it sets the name to the default name. This fixes the bug because it is evaluated at runtime, so our :domain key is picked up as defined. It will also still work with if there is a user-defined :whenever_name variable.

…alled (set_default) causing multiple crontab entries
@ipd ipd changed the title Fixed bug where domain was not set yet when whenever_name was being called (set_default) causing multiple crontab entries Fixed bug where the whenever_name was not getting set properly, causing multiple crontab entries. Sep 6, 2015
gabskoro added a commit that referenced this pull request Sep 6, 2015
Fixed bug where the whenever_name was not getting set properly, causing multiple crontab entries.
@gabskoro gabskoro merged commit 32b2b62 into mina-deploy:master Sep 6, 2015
@gabskoro
Copy link
Member

gabskoro commented Sep 6, 2015

Tnx :)

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.

None yet

2 participants