Comments (14)
@DFurnes so somehow when it goes to pass on that record, it isn't formatted correctly? Would it be helpful to add more logging to this job so we can try to pinpoint the rows that are failing?
from chompy.
We've had 10 failed runs of the ImportRockTheVotePosts
job, likely from multiple attempts on a few CSVs. Here's the list of failed jobs:
Running php artisan queue:failed on ⬢ dosomething-chompy... up, run.9459 (Standard-1X)
+----+------------+----------+------------------------------------+---------------------+
| ID | Connection | Queue | Class | Failed At |
+----+------------+----------+------------------------------------+---------------------+
| 91 | redis | importer | Chompy\Jobs\ImportRockTheVotePosts | 2018-10-09 16:07:21 |
| 81 | redis | importer | Chompy\Jobs\ImportRockTheVotePosts | 2018-10-09 15:37:27 |
| 71 | redis | importer | Chompy\Jobs\ImportRockTheVotePosts | 2018-10-09 15:11:46 |
| 61 | redis | importer | Chompy\Jobs\ImportRockTheVotePosts | 2018-10-09 14:40:58 |
| 51 | redis | importer | Chompy\Jobs\ImportRockTheVotePosts | 2018-10-05 21:02:03 |
| 41 | redis | importer | Chompy\Jobs\ImportRockTheVotePosts | 2018-10-05 20:41:27 |
| 31 | redis | importer | Chompy\Jobs\ImportRockTheVotePosts | 2018-10-05 20:16:00 |
| 21 | redis | importer | Chompy\Jobs\ImportRockTheVotePosts | 2018-10-05 18:19:17 |
| 11 | redis | importer | Chompy\Jobs\ImportRockTheVotePosts | 2018-10-05 18:10:51 |
| 1 | redis | importer | Chompy\Jobs\ImportRockTheVotePosts | 2018-10-05 17:38:06 |
+----+------------+----------+------------------------------------+---------------------+
from chompy.
All of the jobs failed with the same issue, encoding a row for the CreateRockTheVotePostInRogue
job:
Illuminate\Queue\InvalidPayloadException: Unable to JSON encode payload. Error code: 5 in /app/vendor/laravel/framework/src/Illuminate/Queue/Queue.php:83
Stack trace:
...
#6 /app/app/Jobs/ImportRockTheVotePosts.php(68): Chompy\Jobs\CreateRockTheVotePostInRogue::dispatch(Array)
#7 [internal function]: Chompy\Jobs\ImportRockTheVotePosts->handle(Object(Chompy\Services\Rogue))
This one is from rock-the-vote-importer2018-10-09 15:37:20.csv
.
from chompy.
Another interesting thing is that we have some failed rows, like this one, which logged "There was an error with that user" and what looks like a validation error but did not fail the job (so we can't retry).
from chompy.
@katiecrane I think that's a good idea! We were trying to sleuth how far it might have gotten by looking at created user accounts, but more logging will definitely be useful here (maybe catching this InvalidPayloadException
exception and logging the actual contents of the row before failing the job).
from chompy.
@DFurnes should we also remove the try/catch when grabbing or creating users so that it will end up in the failed table?
from chompy.
Oh man, here's a potential culprit! Jen found this bad-boy on row 34 of this CSV: ‚™¥_ñ
🙀
from chompy.
So two problems that we can fix right off the bat:
- We should be catching any exceptions that occur when processing rows, logging details about them, and continuing to process the rest of a CSV in
CreateRockTheVotePostInRogue
. - If something goes wrong in
CreateRockTheVotePostInRogue
, we need to actually fail the job (not just log something and continue)! Right now we don't have a ton of insight into why individual users are failing & no straightforward way to re-try them later on if we wanted to.
from chompy.
@DFurnes should we also remove the try/catch when grabbing or creating users so that it will end up in the failed table?
Ah sorry, yes! Just refreshed the page and saw this. 👁 Yeah, we'd want either of these failures to actually stop the job from processing. We can also probably remove some of the extraneous isset()
conditionals once we've done that (since we can trust the exception will stop the job).
from chompy.
Oh, Jen found another one – this time a first name of Ja_„ŽQuie
. I wonder if this is an issue with Redis not handling special UTF-8 characters correctly. We ran into something similar in Bertly I think...
from chompy.
And D_„ŽJae
! Man, who named these kids!?
from chompy.
@DFurnes since we are switching to SQS instead of Redis, do you think these special UTF-8 characters will be handled correctly now?
from chompy.
@chloealee Yes, I believe SQS should handle these properly!
from chompy.
@DFurnes yay great! PR coming soon for what you outlined here!
from chompy.
Related Issues (12)
- Different Pusher channels per environment HOT 1
- Dig into sporadic 422 errors when sending to Rogue HOT 1
- Add a default status
- Importing Historic Share Data HOT 22
- RTV Imports HOT 6
- TurboVote Imports: Duplicate Records found HOT 6
- TurboVote Imports: MIssing data in quasar HOT 2
- CSVs made in Excel error out HOT 1
- Update Northstar Client
- unit tests
- CSV Column Validation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chompy.