Skip to content

Commit

Permalink
Minor touchups
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Oct 14, 2014
1 parent 1e2fa2e commit 323571e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dags/examples/hourly.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

default_args = {
'owner': 'max',
'start_date': datetime(2014, 10, 1),
'start_date': datetime(2014, 10, 12),
'schedule_interval': timedelta(hours=1),
'mysql_dbid': 'local_mysql',
}
Expand Down
25 changes: 22 additions & 3 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,30 @@ Debian packages
sudo apt-get install libmysqlclient-dev mysql-server
sudo apt-get g++

Required environment variable, add this to your .bashrc
'''''''''''''''''''''''''''''''''''''''''''''''''''''''
Mac setup
'''''''''''''''

::

# Install mysql
brew install mysql
# Start mysql
mysql.server start

# Install python package managers
sudo easy_install pip
sudo pip install virtualenv

Required environment variable, add this to your .bashrc or .bash_profile
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

::

export FLUX_HOME=~/Flux
export PATH=$PATH:$FLUX_HOME/flux/bin
# also run it, or source it, or start a new shell
source ~/.bashrc

Create a python virtualenv
''''''''''''''''''''''''''
Expand All @@ -44,8 +61,10 @@ fine.

::

# If :
$ mysql -u root -p
mysql> CREATE DATABASE flux;
mysql>
CREATE DATABASE flux;
CREATE USER 'flux'@'localhost' IDENTIFIED BY 'flux';
GRANT ALL PRIVILEGES ON flux.* TO 'flux'@'localhost';

Expand Down
12 changes: 6 additions & 6 deletions flux/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def command(
force=False,
pickle=None):
"""
Returns a command that can be executed anywhere where flux is
Returns a command that can be executed anywhere where flux is
installed. This command is part of the message sent to executors by
the orchestrator.
"""
Expand Down Expand Up @@ -472,7 +472,7 @@ def __init__(self, event, task_instance):
class BaseJob(Base):
"""
Abstract class to be derived for jobs. Jobs are processing items with state
and duration that aren't task instances. For instance a BackfillJob is
and duration that aren't task instances. For instance a BackfillJob is
a collection of task instance runs, but should have it's own state, start
and end time.
"""
Expand Down Expand Up @@ -762,7 +762,7 @@ def get_flat_relatives(self, upstream=False):

def detect_downstream_cycle(self, task=None):
"""
When invoked, this routine will raise an exception if a cycle is
When invoked, this routine will raise an exception if a cycle is
detected downstream from self. It is invoked when tasks are added to
the DAG to detect cycles.
"""
Expand Down Expand Up @@ -794,7 +794,7 @@ def run(

def get_direct_relatives(self, upstream=False):
"""
Get the direct relatives to the current task, upstream or
Get the direct relatives to the current task, upstream or
downstream.
"""
if upstream:
Expand Down Expand Up @@ -961,8 +961,8 @@ def sub_dag(
self, task_regex,
include_downstream=False, include_upstream=True):
"""
Returns a subset of the current dag as a deep copy of the current dag
based on a regex that should match one or many tasks, and includes
Returns a subset of the current dag as a deep copy of the current dag
based on a regex that should match one or many tasks, and includes
upstream and downstream neighboors based on the flag passed.
"""
dag = copy.deepcopy(self)
Expand Down
1 change: 0 additions & 1 deletion flux/operators/mysql_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def __init__(self, sql, mysql_dbid, *args, **kwargs):
Parameters:
mysql_dbid: reference to a specific mysql database
sql: the sql code you to be executed
"""
super(MySqlOperator, self).__init__(*args, **kwargs)

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
chartkick
flake8
flask
flask-admin
flask-bootstrap
Expand Down

0 comments on commit 323571e

Please sign in to comment.