Revision 99e6329f trunk/Pithos.Core/Agents/PollAgent.cs
b/trunk/Pithos.Core/Agents/PollAgent.cs | ||
---|---|---|
194 | 194 |
Log.Info("Scheduled"); |
195 | 195 |
var client = new CloudFilesClient(accountInfo); |
196 | 196 |
|
197 |
var containers = client.ListContainers(accountInfo.UserName); |
|
197 |
//We don't need to check the trash container |
|
198 |
var containers = client.ListContainers(accountInfo.UserName).Where(c=>c.Name!="trash"); |
|
198 | 199 |
|
199 | 200 |
|
200 | 201 |
CreateContainerFolders(accountInfo, containers); |
... | ... | |
214 | 215 |
client.ListObjects(accountInfo.UserName, container.Name, since), container.Name)).ToList(); |
215 | 216 |
//BUG: Can't detect difference between no changes or no objects |
216 | 217 |
//ListObjects returns nothing if there are no changes since the last check time (since value) |
217 |
//TODO: Must detect the difference between no server objects an |
|
218 |
var listShared = Task<IList<ObjectInfo>>.Factory.StartNew(_ => client.ListSharedObjects(since), "shared"); |
|
218 |
//TODO: Must detect the difference between no server objects and no change |
|
219 |
|
|
220 |
//NOTE: One option is to "mark" all result lists with their container name, or |
|
221 |
//rather the url of the container |
|
222 |
//Another option |
|
223 |
|
|
224 |
var listShared = Task<IList<ObjectInfo>>.Factory.StartNew(_ => |
|
225 |
client.ListSharedObjects(since), "shared"); |
|
219 | 226 |
listObjects.Add(listShared); |
220 | 227 |
var listTasks = await Task.Factory.WhenAll(listObjects.ToArray()); |
221 | 228 |
|
... | ... | |
229 | 236 |
from obj in objectList.Result |
230 | 237 |
select obj; |
231 | 238 |
|
232 |
var trashObjects = dict["trash"].Result; |
|
233 | 239 |
var sharedObjects = dict["shared"].Result; |
234 | 240 |
|
235 | 241 |
//DON'T process trashed files |
Also available in: Unified diff