Anton Shestakov <av6@dwimlabs.net>, Thu, 11 Aug 2016 18:21:31 +0800
pipelines: make the second run quiet and check that nothing's changed
Using exit within current shell (i.e. `{}` instead of `()`) is an experiment.
fruitbar/indexes.py
Permissions: -rw-r--r--
from CodernityDB.hash_index import HashIndex class ProjectIndex(HashIndex): def __init__(self, *args, **kwargs): kwargs['key_format'] = '16s' super(ProjectIndex, self).__init__(*args, **kwargs) def make_key_value(self, data): if data['_t'] == 'project': return md5(data['workspace'].encode('utf-8')).digest(), None class TaskIndex(HashIndex): def __init__(self, *args, **kwargs): kwargs['key_format'] = '16s' super(TaskIndex, self).__init__(*args, **kwargs) def make_key_value(self, data): return md5(data['workspace'].encode('utf-8')).digest(), None def run_delete_for_project(self, db, workspace, project_id): for task in db.get_many('task', workspace, with_doc=True): if task['doc']['project_id'] == project_id: