[tuxdroid-svn] r5362 - software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers
Status: Beta
Brought to you by:
ks156
|
From: remi <c2m...@c2...> - 2009-09-11 14:50:26
|
Author: remi
Date: 2009-09-11 16:50:10 +0200 (Fri, 11 Sep 2009)
New Revision: 5362
Modified:
software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/03_resourceUgcServer.py
Log:
* Fixed bug with ugc task insertions
Modified: software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/03_resourceUgcServer.py
===================================================================
--- software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/03_resourceUgcServer.py 2009-09-11 13:11:01 UTC (rev 5361)
+++ software_suite_v3/smart-core/smart-server/trunk/resources/03_content_servers/03_resourceUgcServer.py 2009-09-11 14:50:10 UTC (rev 5362)
@@ -300,26 +300,28 @@
[delay['hour'], delay['minute'], delay['second']],
data)
ugcTask.setTaskId1(taskId)
- if ugc.getCommand(parentTask.getCommand()).isDaemon() and \
- parentTask.getType() == "DAILY AT":
- command = "resourceUgcServer.stopUgc"
- arguments = (ugc.getDescription().getUuid(),)
- data = {
- 'commandType' : 'ugc_stop',
- 'uuid' : ugc.getDescription().getUuid(),
- }
- taskId, taskName = resourceScheduler.createTask(
- command,
- arguments,
- parentTask.getType(),
- ugcTask.getName(),
- ugcTask.getWeekMask(),
- [date['year'], date['month'], date['day']],
- [hoursEnd['hour'], hoursEnd['minute'], hoursEnd['second']],
- [hoursEnd['hour'], hoursEnd['minute'], hoursEnd['second']],
- [delay['hour'], delay['minute'], delay['second']],
- data)
- ugcTask.setTaskId2(taskId)
+ parentCommand = ugc.getCommand(parentTask.getCommand())
+ if parentCommand != None:
+ if parentCommand.isDaemon() and \
+ parentTask.getType() == "DAILY AT":
+ command = "resourceUgcServer.stopUgc"
+ arguments = (ugc.getDescription().getUuid(),)
+ data = {
+ 'commandType' : 'ugc_stop',
+ 'uuid' : ugc.getDescription().getUuid(),
+ }
+ taskId, taskName = resourceScheduler.createTask(
+ command,
+ arguments,
+ parentTask.getType(),
+ ugcTask.getName(),
+ ugcTask.getWeekMask(),
+ [date['year'], date['month'], date['day']],
+ [hoursEnd['hour'], hoursEnd['minute'], hoursEnd['second']],
+ [hoursEnd['hour'], hoursEnd['minute'], hoursEnd['second']],
+ [delay['hour'], delay['minute'], delay['second']],
+ data)
+ ugcTask.setTaskId2(taskId)
def deleteAlertsFromScheduler(self, ugc):
"""Delete activated ugc alerts from the scheduler.
|