##// END OF EJS Templates
setting a period to send by FTP
Daniel Valdez -
r489:a860ec855d7e
parent child
Show More
@@ -299,6 +299,7 class FTP():
299 299 class SendByFTP(Operation):
300 300 def __init__(self):
301 301 self.status = 1
302 self.counter = 0
302 303
303 304 def error_print(self, ValueError):
304 305 print ValueError, 'Error FTP'
@@ -337,8 +338,10 class SendByFTP(Operation):
337 338 if len(self.filenameList) == 0:
338 339 self.status = 0
339 340
340 def run(self, dataOut, ext, localfolder, remotefolder, server, username, password):
341 def run(self, dataOut, ext, localfolder, remotefolder, server, username, password, period=1):
341 342
343 self.counter += 1
344 if self.counter >= period:
342 345 self.filterByExt(ext, localfolder)
343 346
344 347 self.connect(server, username, password, remotefolder)
@@ -346,3 +349,6 class SendByFTP(Operation):
346 349 self.put()
347 350
348 351 self.close()
352
353 self.counter = 0
354
General Comments 0
You need to be logged in to leave comments. Login now