MolSSI / QCFractal

@@ -2171,9 +2171,6 @@
Loading
2171 2171
                )
2172 2172
2173 2173
                new_items = query.all()
2174 -
2175 -
                # Store in dict form for returning. We will add the updated fields later
2176 -
                found.extend([task.to_dict(exclude=update_fields.keys()) for task in new_items])
2177 2174
                new_ids = [x.id for x in new_items]
2178 2175
2179 2176
                # Update all the task records to reflect this manager claiming them
@@ -2183,18 +2180,21 @@
Loading
2183 2180
                    .update(update_fields, synchronize_session=False)
2184 2181
                )
2185 2182
2183 +
                # After commiting, the row locks are released
2184 +
                session.commit()
2185 +
2186 +
                # How many more do we have to query
2186 2187
                new_limit = limit - len(new_items)
2187 2188
2188 2189
                # I would assume this is always true. If it isn't,
2189 2190
                # that would be really bad, and lead to an infinite loop
2190 2191
                assert new_limit >= 0
2191 2192
2192 -
                # After commiting, the row locks are released
2193 -
                session.commit()
2193 +
                # Store in dict form for returning. We will add the updated fields later
2194 +
                found.extend([task.to_dict(exclude=update_fields.keys()) for task in new_items])
2194 2195
2195 2196
            # avoid another trip to the DB to get the updated values, set them here
2196 2197
            found = [TaskRecord(**task, **update_fields) for task in found]
2197 -
            session.commit()
2198 2198
2199 2199
        if update_count != len(found):
2200 2200
            self.logger.warning("QUEUE: Number of found tasks does not match the number of updated tasks.")
Files Coverage
qcfractal 88.05%
Project Totals (69 files) 88.05%
1
coverage:
2
  ignore:
3
    - */tests/*
4
    - qcfractal/dashboard/* # early state
5
    - qcfractal/alembic/* # difficult to test
6
    - qcfractal/_version.py
7
    - setup.py
8
  status:
9
    patch: false
10
    project:
11
      default:
12
        threshold: 80%
13
comment:
14
  layout: "header"
15
  require_changes: false
16
  branches: null
17
  behavior: once
18
  flags: null
19
  paths: null
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading