postpone gridftp initialization (magical fix of uwsgi issues)
[qcg-portal.git] / qcg / models.py
index 451d7fb..0bc0cb2 100644 (file)
@@ -194,6 +194,7 @@ class Allocation(models.Model):
     efficiency = models.IntegerField(u"Efektywność", blank=True, null=True)  # ??
     comment = models.TextField(u"Komentarz", blank=True, default='')
     memory_usage = models.PositiveIntegerField(u"Użycie pamięci", blank=True, null=True)
+    working_directory = models.CharField(u"Katalog roboczy", max_length=1024, blank=True, default='')
 
     class Meta:
         verbose_name = u"Alokacja"
@@ -208,7 +209,8 @@ class Allocation(models.Model):
         attrs = get_attributes(qcg_allocation, ('host_name', 'status_description', 'processes_count', 'slots_count',
                                                 'processes_group_id', 'submission_time', 'estimated_start_time',
                                                 'finish_time', 'local_submission_time', 'local_start_time',
-                                                'local_finish_time', 'purged', 'efficiency', 'comment', 'memory_usage'))
+                                                'local_finish_time', 'purged', 'efficiency', 'comment', 'memory_usage',
+                                                'working_directory'))
 
         attrs['status'] = Allocation.STATUS_CHOICES_REVERSED[qcg_allocation.status]
 
@@ -235,6 +237,4 @@ class NodeInfo(models.Model):
 
     @staticmethod
     def qcg_map(qcg_node):
-        return {'name': qcg_node.name,
-                # FIXME
-                'count': qcg_node.slots_count.intValue() if qcg_node.slots_count is not None else None}
+        return {'name': qcg_node.name, 'count': qcg_node.slots_count}