Skip to content

Commit

Permalink
Fix the issues with flake8 and add some todos.
Browse files Browse the repository at this point in the history
  • Loading branch information
hengfengli committed Dec 1, 2018
1 parent 03f979f commit 14fe929
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ bump-minor:
bump-major:
$(BUMPVERSION) major

clean: clean-pyc clean-build
clean: clean-pyc clean-build clean-test

clean-dist: clean

clean-build:
rm -rf build/ dist/ .eggs/ *.egg-info/ .tox/ .coverage cover/

clean-test:
rm -rf .pytest_cache/

clean-pyc:
-find . -type f -a \( -name "*.pyc" -o -name "*$$py.class" \) | xargs rm
-find . -type d -name "__pycache__" | xargs rm -r
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ Below shows the schema of checkpointing:

## Todo

* Add type checking with `mypy`
* Add the config for travis CI
* Add code coverage check
* Support other storage solutions (mysql, dynamodb, redis, etc.) for checkpointing
* Rebalance when the number of shards changes
* Allow kcpy to run on multiple machines
Expand Down
4 changes: 2 additions & 2 deletions kcpy/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def __init__(self, sqlite_file_path, db_name, consumer_name: str, stream_name: s
def init_db(self):
conn = sqlite3.connect(self.sqlite_file_path)
c = conn.cursor()
c.execute(f'''CREATE TABLE IF NOT EXISTS {self.db_name}
(consumer_name text, stream_name text, shard_id text, seq_no text)''')
c.execute(f'CREATE TABLE IF NOT EXISTS {self.db_name}'
'(consumer_name text, stream_name text, shard_id text, seq_no text)')
conn.commit()
conn.close()

Expand Down

0 comments on commit 14fe929

Please sign in to comment.