-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#7 queue all notifications, add a cron script and configure in cron o…
…n mws3 setup, added array of admin contacts in case sendingn fails
- Loading branch information
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import subprocess | ||
|
||
def subprocess_cmd(command): | ||
""" | ||
Function used to run shell commands | ||
This is Python that creates a Python env | ||
which then runs Python commands - hhmmm | ||
""" | ||
process = subprocess.Popen(command,stdout=subprocess.PIPE, shell=True) | ||
proc_stdout = process.communicate()[0].strip() | ||
print proc_stdout | ||
|
||
|
||
import os | ||
|
||
filedir_path = "%s/.." % os.path.dirname(os.path.realpath(__file__)) | ||
|
||
schemacmd=". %s/env/bin/activate; %s/edpcmentoring/manage.py emit_notices --settings=edpcmentoring.settings_mws3 2>&1 | sed -e '/RemovedInDjango110Warning/d' | sed -e '/raven_return, name/d'" % (filedir_path,filedir_path) | ||
subprocess_cmd(schemacmd) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters