Skip to content

Disable cron generation #1

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions drupal/Drupal.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,7 @@ def generate_drush_cron(repo, branch, autoscale=None):
if exists("/etc/cron.d/%s_%s_cron" % (repo, branch)):
print "===> Cron already exists, moving along"
else:
if autoscale is None:
print "===> No cron job, creating one now"
now = datetime.datetime.now()
sudo("touch /etc/cron.d/%s_%s_cron" % (repo, branch))
append_string = """%s * * * * www-data /usr/local/bin/drush @%s_%s cron > /dev/null 2>&1""" % (now.minute, repo, branch)
append("/etc/cron.d/%s_%s_cron" % (repo, branch), append_string, use_sudo=True)
print "===> New Drupal cron job created at /etc/cron.d/%s_%s_cron" % (repo, branch)
else:
print "===> This is an autoscale layout, cron should be handled by another task runner such as Jenkins"
print "===> Crons disabled for development sites"


# This function is used to get a fresh database of the site to import into the custom
Expand Down