roam/daily/2021-11-30.org
2021-12-03 15:52:19 -05:00

406 lines
16 KiB
Org Mode

:PROPERTIES:
:ID: 04ab4d9c-b155-404f-a914-61476cb1ba94
:END:
#+title: 2021-11-30
* Import issues
https://aweber.slack.com/archives/CEM26RCMR/p1638119245004100
https://admin.aweber.io/account/imports/440922
#+begin_quote
Ok, I'm running subscriber search for the different date ranges in subscriber
management to see what we get back to see if there are any particular import
days that don't match up in subscriber management.
10/12/2021 - 619 :white_check_mark:
10/19/2021 - 17 :white_check_mark:
10/24/2021 - 16 :white_check_mark:
11/02/2021 - 0 :x: (expecting 13)
11/03/2021 - 0 :x: (expecting 21)
11/04/2021 - 0 :x: (expecting 65)
11/05/2021 - 0 :x: (expecting 67)
11/09/2021 - 146 :x: (expecting 156)
11/16/2021 - 0 :x: (expecting 70)
11/21/2021 - 0 :x: (expecting 98)
11/28/2021 - 0 :x: (expecting 214)
Total: 798
#+end_quote
#+HEADER: :cache yes :eval no-export
#+HEADER: :engine postgresql
#+HEADER: :dbhost app.service.production.consul
#+HEADER: :dbuser cp_aweber
#+HEADER: :database app-txn
#+HEADER: :dbpassword mgoQKqV6ztMap8TvL9UuiXx3b27P3DRCGkwnE6jrhy4dfc2eYN
#+begin_src sql
SELECT file_upload_id, the_date, (num_tot - num_bad) AS expected, num_updated, status
FROM file_upload WHERE unit_id = 6145308
ORDER BY the_date DESC
#+end_src
#+RESULTS[a495427180850356bf15809decd25622d71cc1f9]:
| file_upload_id | the_date | expected | num_updated | status |
|----------------+-------------------------------+----------+-------------+----------|
| 2692672 | 2021-11-28 12:03:25.048179-05 | 214 | 0 | Imported |
| 2688326 | 2021-11-21 10:08:17.397923-05 | 98 | 0 | Imported |
| 2685579 | 2021-11-16 14:22:04.300465-05 | 70 | 0 | Imported |
| 2681302 | 2021-11-09 17:01:08.179064-05 | 10 | 0 | Imported |
| 2680864 | 2021-11-09 07:56:34.510711-05 | 146 | 0 | Imported |
| 2680487 | 2021-11-08 15:20:48.086738-05 | | 0 | Imported |
| 2679310 | 2021-11-06 09:58:23.659421-04 | | 0 | Imported |
| 2678656 | 2021-11-05 06:23:04.362125-04 | 67 | 0 | Imported |
| 2677978 | 2021-11-04 10:39:26.901495-04 | 65 | 0 | Imported |
| 2677151 | 2021-11-03 09:46:37.613333-04 | 21 | 0 | Imported |
| 2676857 | 2021-11-02 20:41:03.899749-04 | 13 | 0 | Imported |
| 2671346 | 2021-10-24 16:17:56.890275-04 | 16 | 0 | Imported |
| 2668360 | 2021-10-19 10:23:31.828626-04 | 17 | 0 | Imported |
| 2664053 | 2021-10-12 09:38:45.075332-04 | 619 | 0 | Imported |
#+begin_example
core_api_1/core_api.2021-11-28.log.gz:core-api1 [28-Nov-2021 17:03:25] WARNING core_api api tornado.general - 400 POST /v1/subscribers?account_id=440922&list_id=6145308 (127.0.0.1): An invalid argument was provided to the API
core_api_1/core_api.2021-11-28.log.gz-core-api1 [28-Nov-2021 17:03:25] WARNING core_api api tornado.access - 400 POST /v1/subscribers?account_id=440922&list_id=6145308 (127.0.0.1) 77.91ms
core_api_1/core_api.2021-11-28.log.gz-core-api1 [28-Nov-2021 17:03:25] ERROR core_api api awsubscribers.mixins.postgres - Database programming error: proc coreapi_subscriber.add_subscriber args (u'6145308', u'2021-11-28T17:03:25.243897+00:00', u'bbridenstine05@gmail.com', u'Bryana Bridenstine', None, 16083773642, None, u'import', 'False', 'active', None, None, None, None, None, None, None, None, None, None, None, 2692672, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None)
core_api_1/core_api.2021-11-28.log.gz-Traceback (most recent call last):
core_api_1/core_api.2021-11-28.log.gz- File "/usr/local/lib/python2.7/dist-packages/awsubscribers/mixins/postgres.py", line 140, in execute_proc
core_api_1/core_api.2021-11-28.log.gz- result = yield self.application.app_session.callproc(proc, args)
core_api_1/core_api.2021-11-28.log.gz- File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
core_api_1/core_api.2021-11-28.log.gz- value = future.result()
core_api_1/core_api.2021-11-28.log.gz- File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
core_api_1/core_api.2021-11-28.log.gz- raise_exc_info(self._exc_info)
core_api_1/core_api.2021-11-28.log.gz- File "<string>", line 3, in raise_exc_info
core_api_1/core_api.2021-11-28.log.gz-ProgrammingError: function coreapi_subscriber.add_subscriber(unknown, unknown, unknown, unknown, unknown, bigint, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, integer, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown) does not exist
core_api_1/core_api.2021-11-28.log.gz-LINE 1: SELECT * FROM coreapi_subscriber.add_subscriber(E'6145308',E...
core_api_1/core_api.2021-11-28.log.gz- ^
core_api_1/core_api.2021-11-28.log.gz-HINT: No function matches the given name and argument types. You might need to add explicit type casts.
#+end_example
#+begin_src python
#+end_src
#+begin_src python :exports results
columns = (
"in_list_id integer",
"in_timehit timestamp with time zone",
"in_email character varying",
"in_name character varying",
"in_name2 character varying",
"in_message integer",
"in_add_url character varying",
"in_add_method_str text",
"in_verified_str text",
"in_stop_status text",
"in_note character varying",
"in_add_notes character varying",
"in_geog_country character varying",
"in_geog_region character varying",
"in_geog_city character varying",
"in_geog_postal character varying",
"in_geog_lat double precision",
"in_geog_lon double precision",
"in_geog_dma_code integer",
"in_geog_time_zone text",
"in_next_target_followuptime timestamp with time zone",
"in_file_upload_id integer",
"in_datum1 text",
"in_datum2 text",
"in_datum3 text",
"in_datum4 text",
"in_datum5 text",
"in_datum6 text",
"in_datum7 text",
"in_datum8 text",
"in_datum9 text",
"in_datum10 text",
"in_datum11 text",
"in_datum12 text",
"in_datum13 text",
"in_datum14 text",
"in_datum15 text",
"in_datum16 text",
"in_datum17 text",
"in_datum18 text",
"in_datum19 text",
"in_datum20 text",
"in_datum21 text",
"in_datum22 text",
"in_datum23 text",
"in_datum24 text",
"in_datum25 text",
)
values = (
u"6145308",
u"2021-11-28T17:03:25.243897+00:00",
u"bbridenstine05@gmail.com",
u"Bryana Bridenstine",
None,
16083773642,
None,
u"import",
"False",
"active",
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
2692672,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
None,
)
return list(zip(columns, values))
#+end_src
#+RESULTS:
| in_list_id integer | 6145308 |
| in_timehit timestamp with time zone | 2021-11-28T17:03:25.243897+00:00 |
| in_email character varying | bbridenstine05@gmail.com |
| in_name character varying | Bryana Bridenstine |
| in_name2 character varying | None |
| in_message integer | 16083773642 |
| in_add_url character varying | None |
| in_add_method_str text | import |
| in_verified_str text | False |
| in_stop_status text | active |
| in_note character varying | None |
| in_add_notes character varying | None |
| in_geog_country character varying | None |
| in_geog_region character varying | None |
| in_geog_city character varying | None |
| in_geog_postal character varying | None |
| in_geog_lat double precision | None |
| in_geog_lon double precision | None |
| in_geog_dma_code integer | None |
| in_geog_time_zone text | None |
| in_next_target_followuptime timestamp with time zone | None |
| in_file_upload_id integer | 2692672 |
| in_datum1 text | None |
| in_datum2 text | None |
| in_datum3 text | None |
| in_datum4 text | None |
| in_datum5 text | None |
| in_datum6 text | None |
| in_datum7 text | None |
| in_datum8 text | None |
| in_datum9 text | None |
| in_datum10 text | None |
| in_datum11 text | None |
| in_datum12 text | None |
| in_datum13 text | None |
| in_datum14 text | None |
| in_datum15 text | None |
| in_datum16 text | None |
| in_datum17 text | None |
| in_datum18 text | None |
| in_datum19 text | None |
| in_datum20 text | None |
| in_datum21 text | None |
| in_datum22 text | None |
| in_datum23 text | None |
| in_datum24 text | None |
| in_datum25 text | None |
The error appears to be claiming the message id is coming in as a bigint
(=16083773642=) but the signature requires nothing bigger than an integer (max:
=2147483647=, https://www.postgresql.org/docs/9.1/datatype-numeric.html).
#+begin_src json
{
"addresses": [
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 66638848984,
"name": "Huasheng Wang",
"email": "pwang86@icloud.com",
"note": null,
"name2": null,
"custom_fields": {
}
},
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 13853264347,
"name": "Kenneth Packer",
"email": "kennethbpacker@gmail.com",
"note": null,
"name2": null,
"custom_fields": {
}
},
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 17024010474,
"name": "Timothy Ledford",
"email": "timo392@icloud.com",
"note": null,
"name2": null,
"custom_fields": {
}
},
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 19183150297,
"name": "greg sharp",
"email": "gs9356@hotmail.com",
"note": null,
"name2": null,
"custom_fields": {
}
},
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 15305317848,
"name": "Michelle Dacey",
"email": "missy830@gmail.com",
"note": null,
"name2": null,
"custom_fields": {
}
},
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 15123654569,
"name": "Misty Wilson",
"email": "ellie_scarlet_777@yahoo.com",
"note": null,
"name2": null,
"custom_fields": {
}
},
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 14047292024,
"name": "Jeffrey Goldenstein",
"email": "jeffreygoldenstein@gmail.com",
"note": null,
"name2": null,
"custom_fields": {
}
},
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 353852276892,
"name": "Lee C",
"email": "leecagney@gmail.com",
"note": null,
"name2": null,
"custom_fields": {
}
},
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 18707405500,
"name": "Jim Creecy",
"email": "tbird17@att.net",
"note": null,
"name2": null,
"custom_fields": {
}
},
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 12484701285,
"name": "Kevin Gilroy",
"email": "kgilroy@gmail.com",
"note": null,
"name2": null,
"custom_fields": {
}
},
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 19103545666,
"name": "Johnathan Williams",
"email": "fireguyofficial@gmail.com",
"note": null,
"name2": null,
"custom_fields": {
}
},
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 962777188000,
"name": "Mazen Zawaideh",
"email": "mazen.zawaideh@icloud.com",
"note": null,
"name2": null,
"custom_fields": {
}
},
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 15097316832,
"name": "Gary Wallace",
"email": "purple-paisley@charter.net",
"note": null,
"name2": null,
"custom_fields": {
}
},
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 12195751916,
"name": "Robin Fiorito",
"email": "nelipot46350@yahoo.com",
"note": null,
"name2": null,
"custom_fields": {
}
},
{
"add_notes": "71.82.189.72",
"tags": [],
"message": 19517196333,
"name": "Vergil Cuenca",
"email": "vergilc@msn.com",
"note": null,
"name2": null,
"custom_fields": {
}
}
],
"should_manually_review": false
}
#+end_src