|
@@ -13,10 +13,8 @@ class Ssgdfs(object):
|
|
|
def start(self):
|
|
|
if 'product' in self.config and self.config['product']:
|
|
|
try:
|
|
|
-
|
|
|
- self.open()
|
|
|
-
|
|
|
- self.login()
|
|
|
+
|
|
|
+ self.restart()
|
|
|
|
|
|
self.core()
|
|
|
|
|
@@ -25,6 +23,12 @@ class Ssgdfs(object):
|
|
|
print e
|
|
|
self.start()
|
|
|
|
|
|
+ def restart(self):
|
|
|
+
|
|
|
+ self.open()
|
|
|
+
|
|
|
+ self.login()
|
|
|
+
|
|
|
def core(self):
|
|
|
|
|
|
'''
|
|
@@ -61,7 +65,12 @@ class Ssgdfs(object):
|
|
|
product.status(config['id'], 2)
|
|
|
continue
|
|
|
else:
|
|
|
- time.sleep(30)
|
|
|
+ if self.num == 100:
|
|
|
+ print 'restart'
|
|
|
+ self.restart()
|
|
|
+ break
|
|
|
+ else:
|
|
|
+ time.sleep(30)
|
|
|
'''
|
|
|
self.num = self.num + 1
|
|
|
|