class Errors: REQUEST_FAILED = "FAILED: request could not be parsed, please contact det-support@xfel.eu" RUN_SKIPPED = "WARN: run at {} is marked to be skipped for calibration." REQUEST_MALFORMED = "FAILED: request {} is malformed, please contact det-support@xfel.eu" UNKNOWN_ACTION = "FAILED: action {} is not known!, please contact det-support@xfel.eu" PATH_NOT_FOUND = "FAILED: run at {} not found!, please contact det-support@xfel.eu" NOTHING_TO_DO = "WARN: nothing to calibrate in path {}, please contact det-support@xfel.eu" CONFIG_ERROR = "FAILED: configuration at {} couldn't be parsed, using default!, please contact det-support@xfel.eu" CONFIG_NOT_FOUND = "WARN: configuration at {} not found, using default!, please contact det-support@xfel.eu" NO_DEFAULT_CONFIG = "FAILED: No default config for instrument {}, detector {} exists!, please contact det-support@xfel.eu" JOB_LAUNCH_FAILED = "FAILED: Failed executing command: {}, code: {}, please contact det-support@xfel.eu" UPLOAD_CONFIG_FAILED = "FAILED: Config for cycle {}, proposal {} could not be uploaded!, please contact det-support@xfel.eu" TRANSFER_EVAL_FAILED = "FAILED: Evaluating transfer to offline failed for proposal {}, run {}, please contact it-support@xfel.eu" MDC_RESPONSE = "FAILED: Response error from MDC: {}" NOT_CONFIGURED = "FAILED: instrument not configured, please contact det-support@xfel.eu" NOT_SUBMITTED = "FAILED: correction of {} failed during submision, please contact det-support@xfel.eu" OTHER_ERROR = "FAILED: Error {}, please contact det-support@xfel.eu" class MigrationError(Exception): @classmethod def timeout(cls, run: int, proposal: int, time: str): return cls( f"FAILED: migration issue for proposal {proposal} run `{run}`: " f"migration still incompleted after {time}, " "manually restarting migration may help" ) class MDC: MIGRATION_TIMEOUT = "Timeout waiting for migration. Contact it-support@xfel.eu" NOTHING_TO_DO = "Nothing to calibrate for this run, copied raw data only" class Success: UPLOADED_CONFIG = "SUCCESS: Uploaded config for cycle {}, proposal {}" START_CORRECTION = "SUCCESS: Started correction: proposal {}, run {}" START_CHAR = "SUCCESS: Started dark characterization: proposal {}, run {}" START_CORRECTION_SIM = "SUCCESS: Simulated, not submitting jobs. Would do correction: proposal {}, run {}" START_CHAR_SIM = "SUCCESS: Simulated, not submitting jobs. Would do dark characterization: proposal {}, run {}" QUEUED = "SUCCESS: Queued proposal {}, run {} for offline calibration" REPROD_QUEUED = "SUCCESS: Queued proposal {}, run {} for reproducing previous offline calibration" DONE_CORRECTION = "SUCCESS: Finished correction: proposal {}. run {}" DONE_CHAR = "SUCCESS: Finished dark characterization: proposal {}, run {}"