add same option for process function and method send_rs_data

Wed, 08 Aug 2018 11:54:39 +0200

author
madrouin@astronotus.lmd.polytechnique.fr
date
Wed, 08 Aug 2018 11:54:39 +0200
branch
send_rs_data
changeset 21
4fcec88bfe3d
parent 20
111f05973553
child 22
5e3f107df50a

add same option for process function and method

scc_access/scc_access.py file | annotate | diff | comparison | revisions
--- a/scc_access/scc_access.py	Wed Aug 08 11:50:12 2018 +0200
+++ b/scc_access/scc_access.py	Wed Aug 08 11:54:39 2018 +0200
@@ -203,13 +203,13 @@
             if monitor:
                 self.monitor_processing(measurement_id)
 
-    def process(self, filename, system_id):
+    def process(self, filename, system_id, rs_filename=None):
         """ Upload a file for processing and wait for the processing to finish.
         If the processing is successful, it will download all produced files.
         """
         logger.info("--- Processing started on %s. ---" % datetime.datetime.now())
         # Upload file
-        measurement_id = self.upload_file(filename, system_id)
+        measurement_id = self.upload_file(filename, system_id, rs_filename=rs_filename)
 
         measurement = self.monitor_processing(measurement_id)
         return measurement
@@ -429,13 +429,13 @@
     return measurement_id
 
 
-def process_file(filename, system_id, settings):
+def process_file(filename, system_id, settings, rs_filename=None):
     """ Shortcut function to process a file to the SCC. """
     logger.info("Processing file %s, using sytem %s" % (filename, system_id))
 
     scc = SCC(settings['basic_credentials'], settings['output_dir'], settings['base_url'])
     scc.login(settings['website_credentials'])
-    measurement = scc.process(filename, system_id)
+    measurement = scc.process(filename, system_id, rs_filename=rs_filename)
     scc.logout()
     return measurement
 

mercurial