Skip to content

Commit

Permalink
update the task Service getTaskByName to fall back to the remoteTaskR…
Browse files Browse the repository at this point in the history
…epository
  • Loading branch information
jeremysawesome committed Sep 23, 2015
1 parent 5af3137 commit 7393d01
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Nagger.Services/TaskService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ public Task GetLastTask()

public Task GetTaskByName(string name)
{
return _localTaskRepository.GetTaskByName(name);
var task = _localTaskRepository.GetTaskByName(name);
if (task != null) return task;

task = _remoteTaskRepository.GetTaskByName(name);
if(task != null) StoreTask(task);
return task;
}

public Task GetTaskById(string taskId)
Expand Down

0 comments on commit 7393d01

Please sign in to comment.