diff --git a/webservice/manual_launch.py b/webservice/manual_launch.py index a56e7b4fe5ed9f11b78579ffa39e59a334c93172..dd038780044426decbc6e2081bb6a8d2c96f44dd 100644 --- a/webservice/manual_launch.py +++ b/webservice/manual_launch.py @@ -8,7 +8,7 @@ import zmq parser = argparse.ArgumentParser( description='Request dark characterization. Will wait on data transfers to complete first!') parser.add_argument('--proposal', type=str, help='The proposal number, without leading p, but with leading zeros') -parser.add_argument('--instrument', type=str, choices=["SPB", "MID", "FXE", "SCS", "SQS", "HED"], help='The instrument') +parser.add_argument('--instrument', type=str, choices=["SPB", "MID", "FXE", "SCS", "SQS", "HED", "DETLAB"], help='The instrument') parser.add_argument('--cycle', type=str, help='The facility cycle') parser.add_argument('--run', type=int, help='Run number as an integer') parser.add_argument('--mdc-id', type=int, help='Run id from MDC') diff --git a/webservice/serve_overview.py b/webservice/serve_overview.py index 590ed31b5ef31466c687de7fc6a01aa19125b26e..559c2f9c3eae6d616e41c1a2fc21abaaf76c25a9 100644 --- a/webservice/serve_overview.py +++ b/webservice/serve_overview.py @@ -70,6 +70,7 @@ class RequestHandler(BaseHTTPRequestHandler): for s in self.templates["css"].split("\n"): self.wfile.write(s.encode()) return + if "pdf?" in self.path: puuid = self.path.split("?")[1] fpath = self.pdf_queue.get(puuid, None) @@ -230,6 +231,8 @@ class RequestHandler(BaseHTTPRequestHandler): for r in conn.fetchall(): rid, jobid, proposal, run, flg, status = r run = int(run) + if "QUEUE" in status or "PD" in status: + flg = "Q" rjobs = running_jobs.get("r{:04d}".format(run), {'proposal': proposal, 'statii': []}) rjobs["statii"].append((flg, status)) diff --git a/webservice/templates/serve_overview.css b/webservice/templates/serve_overview.css index fae2fdfa7fa13732c78da60860d8e15e38220ff7..70038371fb5835056894e72f94b09004af7592aa 100644 --- a/webservice/templates/serve_overview.css +++ b/webservice/templates/serve_overview.css @@ -45,6 +45,10 @@ dd { background-color: orange; } +.Q { + background-color: yellow; +} + .A { background-color: white; } @@ -53,4 +57,4 @@ dd { float: right; width: 100px; -} \ No newline at end of file +} diff --git a/webservice/webservice.py b/webservice/webservice.py index e42494629c000996aef46cbf9427be3509b5bbf6..51e60a32a64258b696d368a733988ce1ff13e097 100644 --- a/webservice/webservice.py +++ b/webservice/webservice.py @@ -107,7 +107,7 @@ async def upload_config(socket, config, yaml, instrument, cycle, proposal): fpath = "{}/{}.yaml".format(prop_dir, proposal) repo.index.add([fpath]) repo.index.commit( - "Update to proposal {}: {}".format(proposal, + "Update to proposal p{}: {}".format(proposal, datetime.now().isoformat())) repo.remote().push() logging.info(Success.UPLOADED_CONFIG.format(cycle, proposal)) @@ -306,6 +306,7 @@ async def copy_untouched_files(file_list, out_folder, run): :param file_list: The list of files to copy :param out_folder: The output folder + :param run: The run which is being handled Copying is done via an asyncio subprocess call """ @@ -591,9 +592,12 @@ async def server_runner(config, mode): # don't need this for xfel-calibrate del thisconf["inset"] - detectors[detector] = thisconf + else: + logging.info("File list for {} at {} is empty" + .format(detector, "{}/RAW-*{}*.h5" + .format(rpath, dconfig["inset"]))) if len(detectors) == 0: logging.warn(Errors.NOTHING_TO_DO.format(rpath)) msg = "Nothing to characterize for these runs"