cloyne / network

5 stars 5 forks source link

Mailing lists do not work, sending to alumni does not work #101

Closed mitar closed 7 years ago

mitar commented 7 years ago

@sunnysideofthescreen sent an e-mail to alumni mailing list, but now it seems everything is broken.

The reason is probably that with new semester we have more sources for the alumni mailing list. Alumni mailing list sources its subscribers from all previous mailing lists.

The issue in the database is:

sympa task_manager[23]: err List::update_user() Unable to execute SQL statement "UPDATE subscriber_table SET update_subscriber='epoch'::timestamp with time zone + '1486181963 sec',include_sources_subscriber='30c809df,3bc92a10,ce2a6bbc,5a1bd2d3,977e5129,91f36eda' WHERE (user_subscriber='XXX' AND list_subscriber='alumni' AND robot_subscriber = 'YYYY')" : ERROR: value too long for type character varying(50)
mitar commented 7 years ago

I reported it upstream.

mitar commented 7 years ago

I made a patch for our Docker image. (For installation by anyone else.)

mitar commented 7 years ago

I increased column size in our exiting database to the same size the patch above increases to (255):

ALTER TABLE subscriber_table ALTER COLUMN include_sources_subscriber SET DATA TYPE character varying(255);

This will make it work for 5x more time. :-) Hopefully they will properly fix this in the future. This might be the source of issues with upgrading to newer versions of Sympa in the future, though. If it will expect that the the size is 50. I doubt that though.

PostgreSQL allows larger sizes for "character varying" columns, so we could even go for 500 if necessary at some point.

mitar commented 7 years ago

To be precise. Each subscriber originally could not be found in more than 5 lists. So members which were in Cloyne for more than 5 terms were problematic to store in the database. Now we increased to around 25. So probably we will not have members who will be in Cloyne for 25 terms (~8 years). ;-)

mitar commented 7 years ago

OK. Fixed. Now also Kelly's e-mails went through.