-
Notifications
You must be signed in to change notification settings - Fork 2
Temporarily remove interest code from monitor loop #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
8be8400
09e1ea3
fac8c3d
095405a
10a1fbc
adbf76d
1ca2a73
5887d06
5f67c32
8bf0962
cc2080c
a15de1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -455,84 +455,51 @@ def submit(event, update, dryrun): | |
| production.status = "running" | ||
| else: | ||
| pipe = production.pipeline | ||
| # check the priority status to see if we need to start | ||
| # the analysis | ||
| to_analyse = True | ||
| if production.status not in {"ready"}: | ||
| to_analyse = False | ||
| else: | ||
| # verify priority method to be used | ||
| priority_method = check_priority_method(production) | ||
| if priority_method == "vanilla": | ||
| N_ok = 0 | ||
| for prod in production._needs: | ||
| if interest_dict_single_analysis[production.event.name][prod]['done']: | ||
| N_ok += 1 | ||
| if N_ok < len(production._needs): | ||
| to_analyse = False | ||
| elif priority_method == "is_interesting": | ||
| if "minimum" in production.meat["needs settings"].keys(): | ||
| N_target = int(production.meta["needs settings"]["minimum"]) | ||
| else: | ||
| # all pipelines should indicate the run as interesting | ||
| N_target = len(production._needs) | ||
| for prod in production._needs: | ||
| if interest_dict_single_analysis[production.event.name][prod]['interest status']: | ||
| N_ok += 1 | ||
| if N_ok < N_target: | ||
| to_analyse = False | ||
| else: | ||
| raise ValueError(f"Priority method {priority_method} not recognized") | ||
| if to_analyse: | ||
| try: | ||
| pipe.build_dag(dryrun=dryrun) | ||
| except PipelineException as e: | ||
| logger.error( | ||
| "failed to build a DAG file.", | ||
| ) | ||
| logger.exception(e) | ||
| click.echo( | ||
| click.style("●", fg="red") | ||
| + f" Unable to submit {production.name}" | ||
| ) | ||
| except ValueError: | ||
| logger.info("Unable to submit an unbuilt production") | ||
|
|
||
| try: | ||
| pipe.build_dag(dryrun=dryrun) | ||
| except PipelineException as e: | ||
| logger.error( | ||
| "failed to build a DAG file.", | ||
| ) | ||
| logger.exception(e) | ||
| click.echo( | ||
| click.style("●", fg="red") | ||
| + f" Unable to submit {production.name}" | ||
| ) | ||
| except ValueError: | ||
| logger.info("Unable to submit an unbuilt production") | ||
| click.echo( | ||
| click.style("●", fg="red") | ||
| + f" Unable to submit {production.name} as it hasn't been built yet." | ||
| ) | ||
| click.echo("Try running `asimov manage build` first.") | ||
| try: | ||
| pipe.submit_dag(dryrun=dryrun) | ||
| if not dryrun: | ||
| click.echo( | ||
| click.style("●", fg="red") | ||
| + f" Unable to submit {production.name} as it hasn't been built yet." | ||
| click.style("●", fg="green") | ||
| + f" Submitted {production.event.name}/{production.name}" | ||
| ) | ||
| click.echo("Try running `asimov manage build` first.") | ||
| try: | ||
| pipe.submit_dag(dryrun=dryrun) | ||
| if not dryrun: | ||
| click.echo( | ||
| click.style("●", fg="green") | ||
| + f" Submitted {production.event.name}/{production.name}" | ||
| ) | ||
| production.status = "running" | ||
| production.status = "running" | ||
|
|
||
| except PipelineException as e: | ||
| production.status = "stuck" | ||
| click.echo( | ||
| click.style("●", fg="red") | ||
| + f" Unable to submit {production.name}" | ||
| ) | ||
| logger.exception(e) | ||
| ledger.update_event(event) | ||
| logger.error( | ||
| f"The pipeline failed to submit the DAG file to the cluster. {e}", | ||
| ) | ||
| if not dryrun: | ||
| # Refresh the job list | ||
| job_list = condor.CondorJobList() | ||
| job_list.refresh() | ||
| # Update the ledger | ||
| ledger.update_event(event) | ||
| else: | ||
| except PipelineException as e: | ||
| production.status = "stuck" | ||
| click.echo( | ||
| click.style("●", fg="yellow") | ||
| + f"Production {production.name} not ready to submit" | ||
| click.style("●", fg="red") | ||
| + f" Unable to submit {production.name}" | ||
| ) | ||
| logger.exception(e) | ||
| ledger.update_event(event) | ||
| logger.error( | ||
| f"The pipeline failed to submit the DAG file to the cluster. {e}", | ||
| ) | ||
|
Comment on lines
+459
to
+496
|
||
| if not dryrun: | ||
| # Refresh the job list | ||
| job_list = condor.CondorJobList() | ||
| job_list.refresh() | ||
| # Update the ledger | ||
| ledger.update_event(event) | ||
|
|
||
| @click.option( | ||
| "--event", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commented-out command suggests it was intended to be removed or may need to be re-enabled later. If this command is not needed for testing, consider removing it entirely rather than leaving it commented. If it needs to be re-enabled as part of future work, add a TODO comment explaining why it's commented out and when it should be re-enabled.