Skip to content

Commit

Permalink
Applies utf-8 encoding to batch_string before creating an md5 hash
Browse files Browse the repository at this point in the history
  • Loading branch information
daveFNbuck committed Aug 2, 2016
1 parent e877f3a commit 37e6a22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion luigi/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,8 @@ def get_work(self, host=None, assistant=False, current_tasks=None, worker=None,
'n_unique_pending': n_unique_pending}

if len(batched_tasks) > 1:
batch_id = hashlib.md5('|'.join(task.id for task in batched_tasks)).hexdigest()
batch_string = '|'.join(task.id for task in batched_tasks)
batch_id = hashlib.md5(batch_string.encode('utf-8')).hexdigest()
for task in batched_tasks:
self._state.set_batch_running(task, batch_id, worker_id)

Expand Down

0 comments on commit 37e6a22

Please sign in to comment.