8000 Fix Scheduler.add_task to overwrite accepts_messages attribute. by riga · Pull Request #2469 · spotify/luigi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix Scheduler.add_task to overwrite accepts_messages attribute. #2469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion luigi/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,6 @@ def add_task(self, task_id=None, status=PENDING, runnable=True,
_default_task = self._make_task(
task_id=task_id, status=PENDING, deps=deps, resources=resources,
priority=priority, family=family, module=module, params=params,
accepts_messages=accepts_messages,
)
else:
_default_task = None
Expand Down Expand Up @@ -831,6 +830,9 @@ def add_task(self, task_id=None, status=PENDING, runnable=True,
task.resources_running = batch_tasks[0].resources_running.copy()
task.time_running = time.time()

if accepts_messages is not None:
task.accepts_messages = accepts_messages

if tracking_url is not None or task.status != RUNNING:
task.tracking_url = tracking_url
if task.batch_id is not None:
Expand Down
0