diff --git a/fireworks/core/firework.py b/fireworks/core/firework.py index 842a97b16..1734bb087 100644 --- a/fireworks/core/firework.py +++ b/fireworks/core/firework.py @@ -325,17 +325,20 @@ def _rerun(self) -> None: a Workflow because a refresh is needed after calling this method. """ if self.state == "FIZZLED": - last_launch = self.launches[-1] - if ( - EXCEPT_DETAILS_ON_RERUN - and last_launch.action - and last_launch.action.stored_data.get("_exception", {}).get("_details") - ): - # add the exception details to the spec - self.spec["_exception_details"] = last_launch.action.stored_data["_exception"]["_details"] - else: - # clean spec from stale details + if len(self.launches) == 0: self.spec.pop("_exception_details", None) + else: + last_launch = self.launches[-1] + if ( + EXCEPT_DETAILS_ON_RERUN + and last_launch.action + and last_launch.action.stored_data.get("_exception", {}).get("_details") + ): + # add the exception details to the spec + self.spec["_exception_details"] = last_launch.action.stored_data["_exception"]["_details"] + else: + # clean spec from stale details + self.spec.pop("_exception_details", None) self.archived_launches.extend(self.launches) self.archived_launches = list(set(self.archived_launches)) # filter duplicates diff --git a/fireworks/core/launchpad.py b/fireworks/core/launchpad.py index 5a559818b..3af3e38f4 100644 --- a/fireworks/core/launchpad.py +++ b/fireworks/core/launchpad.py @@ -203,10 +203,11 @@ def __init__( raise ValueError("Must specify a database name when using a MongoDB URI string.") self.db = self.connection[self.name] else: + if not "socketTimeoutMS" in self.mongoclient_kwargs: + self.mongoclient_kwargs["socketTimeoutMS"] = MONGO_SOCKET_TIMEOUT_MS self.connection = MongoClient( self.host, self.port, - socketTimeoutMS=MONGO_SOCKET_TIMEOUT_MS, username=self.username, password=self.password, authSource=self.authsource, diff --git a/fireworks/flask_site/static/css/styles.css b/fireworks/flask_site/static/css/styles.css index 65270d1ca..5797a8bb4 100644 --- a/fireworks/flask_site/static/css/styles.css +++ b/fireworks/flask_site/static/css/styles.css @@ -18,13 +18,17 @@ footer .navbar .nav { .pull-up { margin-bottom: 30px;} -.fw-link { - border-bottom: 1px dotted; - margin-left: 10px; +table { + width: 100%; + table-layout: fixed; } -.table td{ - vertical-align: middle; +.table td { + vertical-align: middle; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 200px; } @@ -34,9 +38,15 @@ footer .navbar .nav { color: #fff; } -.fw-link{ + +.fw-link { + display: inline-block; + max-width: 100%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; color: white; - padding:2px 5px; + padding: 2px 5px; border-radius: 3px; box-shadow: 0px 1px 0px #aaa; } @@ -122,3 +132,20 @@ form.query button[type=submit] { hr.myhrline{ margin:5px; } + +.wf-name strong { + display: inline-block; + max-width: 150px; /* Adjust maximum width as needed */ + white-space: nowrap; /* Prevent text from wrapping */ + overflow: hidden; /* Hide the overflowed part */ + text-overflow: ellipsis; /* Show ellipsis for overflowed text */ + vertical-align: bottom; +} + +.wf-name { + text-decoration: none; /* Remove underline from the link */ +} + +.wf-name strong:hover { + cursor: pointer; /* Change cursor to pointer on hover */ +} \ No newline at end of file diff --git a/fireworks/flask_site/templates/home.html b/fireworks/flask_site/templates/home.html index bff2b98de..11475b8be 100644 --- a/fireworks/flask_site/templates/home.html +++ b/fireworks/flask_site/templates/home.html @@ -17,13 +17,18 @@
Newest Workflows | ||
---|---|---|
{{wf.state}}
@@ -31,13 +36,12 @@
ID: {{ wf.id }}
-
{% for fw in wf.fireworks %}
{% endfor %}
diff --git a/fireworks/scripts/lpad_run.py b/fireworks/scripts/lpad_run.py
index d4badd6f2..48dbc1128 100644
--- a/fireworks/scripts/lpad_run.py
+++ b/fireworks/scripts/lpad_run.py
@@ -752,7 +752,7 @@ def recover_offline(args: Namespace) -> None:
recovered_fws = []
for launch in lp.offline_runs.find({"completed": False, "deprecated": False}, {"launch_id": 1, "fw_id": 1}):
- if fworker_name and lp.launches.count({"launch_id": launch["launch_id"], "fworker.name": fworker_name}) == 0:
+ if fworker_name and lp.launches.count_documents({"launch_id": launch["launch_id"], "fworker.name": fworker_name}) == 0:
continue
fw = lp.recover_offline(launch["launch_id"], args.ignore_errors, args.print_errors)
if fw:
@@ -1415,9 +1415,16 @@ def lpad(argv: Sequence[str] | None = None) -> int:
recover_parser.set_defaults(func=recover_offline)
forget_parser = subparsers.add_parser("forget_offline", help="forget offline workflows")
+ forget_parser.add_argument(*fw_id_args, **fw_id_kwargs)
forget_parser.add_argument("-n", "--name", help="name")
forget_parser.add_argument(*state_args, **state_kwargs)
forget_parser.add_argument(*query_args, **query_kwargs)
+ forget_parser.add_argument(*launches_mode_args, **launches_mode_kwargs)
+ forget_parser.add_argument(
+ "--password",
+ help="Today's date, e.g. 2012-02-25. Password or positive response to "
+ f"input prompt required when modifying more than {PW_CHECK_NUM} entries.",
+ )
forget_parser.set_defaults(func=forget_offline)
# admin commands
diff --git a/fireworks/user_objects/queue_adapters/common_adapter.py b/fireworks/user_objects/queue_adapters/common_adapter.py
index b83a1ba7b..259d6ada7 100644
--- a/fireworks/user_objects/queue_adapters/common_adapter.py
+++ b/fireworks/user_objects/queue_adapters/common_adapter.py
@@ -251,7 +251,7 @@ def get_njobs_in_queue(self, username=None):
# run qstat
qstat = Command(self._get_status_cmd(username))
- p = qstat.run(timeout=self.timeout, shell=True)
+ p = qstat.run(timeout=self.timeout)
# parse the result
if p[0] == 0:
|