• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

curationexperts / epigaea / 2136
90%
master: 90%

Build:
Build:
LAST BUILD BRANCH: turbolinks-batch-fix
DEFAULT BRANCH: master
Ran 15 Dec 2017 12:12AM UTC
Jobs 1
Files 182
Run time 18s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2136

push

travis-ci

no-reply
Enqueue jobs from XmlImport jobs with only matching ids

The original enqueue logic was somewhat tortured, this cleans it up and
clarifies the intent, fixing several bugs in the process.

When enqueuing, we now loop through the uploaded files, checking that:

  - an id has been minted for the file;
  - the batch item is 'processable', meaning that:
    - the batch contains the item;
    - the batch item does not already have a job;
    - the batch item does not already a persisted object;
  - that a record exists for the file in the import document;
  - that all the files for the record have been uploaded

Only in the case that all of these conditions are met do we enqueue a job. Like
other `Batchable#enqueue!` methods, we return a hash mapping from object ids to
job ids for use by the `Batch`.

The previous logic was less careful about ensuring ids were mapped directly to
filenames. This led to unexpected behavior when enqueuing records with multiple
files and in tracking job status. Tests were updated to fail if these errors are
manifesting.

Setup for shared batchable specs had to be adjusted to ensure that the
identifiers assigned to files match the ones the shared examples provide for the
batch.

Closes #772

2460 of 2726 relevant lines covered (90.24%)

81.74 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2136.1 (2.3.4) 15 Dec 2017 12:12AM UTC 0
90.24
Travis Job 2136.1
Source Files on build 2136
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2136
  • e020a9b2 on github
  • Next Build on fixup-xml-import-enqueue (#2181)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc