-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Digest email bug #3404
Comments
I dug up the log for this on the server too!
Key section:
It looks like we are asking for a parameter in plots2/app/jobs/digest_mail_job.rb Lines 4 to 12 in cda8e40
Vidit, do you know where |
The perform_async (does same work as perform) function is called in schedule.rb, I guess maybe some sort of syntactical error Lines 31 to 37 in 2522459
|
Digging out on this. Can we make this a fto issue? |
If you can identify the change we should make to fix it, and it's only a
few lines, then yeah, I think it'd make a great FTO!
…On Sun, Sep 23, 2018, 1:23 PM Vidit ***@***.***> wrote:
Digging out on this. Can we make this a fto issue?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3404 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ4vZUdNp1ymRSClv7Qq0vZ8sJkvWks5ud8NvgaJpZM4W1uzK>
.
|
I guess, there isn't any syntactical error. But the cronjobs are not updating according to schedule.rb. I did Line 28 in 2522459
|
Hmm, were you able to get past the "0 parameters where expected 1" error?
…On Sun, Sep 23, 2018, 2:59 PM Vidit ***@***.***> wrote:
I guess, there isn't any syntactical error. But the cronjobs are not
updating according to schedule.rb.
@icarito <https://github.com/icarito> do we need to specify environment
in makefile when we deploy the latest code?
I did whenever --update-crontab --set environment=development to make the
it work. I believe the same command needs to be done in the makefile with
production instead.
https://github.com/publiclab/plots2/blob/2522459bfdc21068df2e0e808a8addc6726808e0/Makefile#L28
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3404 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJzpC5nFopzc1FpxllMO8B7h4i7hzks5ud9nigaJpZM4W1uzK>
.
|
yeah I tested locally with The same error occurred for the first one and worked perfectly for the latter one. |
Ok, so do you know where we can insert the right 0 parameter when process()
is called?
…On Sun, Sep 23, 2018, 3:16 PM Vidit ***@***.***> wrote:
yeah I tested locally with
every 1.minutes do runner "DigestMailJob.perform_async" end
and
every 1.minutes do runner "DigestMailJob.perform_async(0)" end
The same error occurred for the first one and worked perfectly for the
latter one.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3404 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ-1ooB2OI1ybg-rm0H1mofrGjv9bks5ud94EgaJpZM4W1uzK>
.
|
Its actually there in the code, right here:- Lines 31 to 37 in 2522459
but the problem I guess is that, the crontab isn't updated after this code was deployed. It still assumes that no argument is passed with the function. Does this make sense? |
Ah, ok! Cool, do we track the crontab settings in git or is there a
reference to compare the production settings against?
Super it looks like you've got this going. Thanks!
…On Sun, Sep 23, 2018, 3:30 PM Vidit ***@***.***> wrote:
Its actually there in the code, right here:-
https://github.com/publiclab/plots2/blob/2522459bfdc21068df2e0e808a8addc6726808e0/config/schedule.rb#L31-L37
but the problem I guess is that, the crontab isn't updated after this code
was deployed. It still assumes that no argument is passed with the
function. Does this make sense?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3404 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ6rlxY85c1oUVgWgHuZbM4pQRZH3ks5ud-E1gaJpZM4W1uzK>
.
|
I guess we can't directly view the cronjobs which are scheduled. It can be viewed by logging on the server only. All we need to do is make the update-crontab command run on production. Needs some more digging though. Will look into it. |
I can log in and look - but what should i be looking for? @icarito would
you mind trying to coordinate with Vidit on this one? Thanks!
…On Mon, Sep 24, 2018 at 12:10 AM Vidit ***@***.***> wrote:
I guess we can't directly view the cronjobs which are scheduled. It can be
viewed by logging on the server only. All we need to do is make the
update-crontab command run on production. Needs some more digging though.
Will look into it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3404 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ_NKu3qnRESYG1BkP75Vif6RGDQ5ks5ueFr2gaJpZM4W1uzK>
.
|
Hi @ViditChitkara - I had missed this one! When does update-crontab need to run? currently we run it on each redeployment: https://github.com/publiclab/plots2/blob/master/Makefile#L17 |
Re reading I see you've been thru the Makefile already. The Makefile is run with environment variables including |
|
|
Ah ok so can we figure out how the crontab was originally set and then
update it to include the new parameter format?
…On Mon, Oct 15, 2018, 12:29 PM Sebastian Silva ***@***.***> wrote:
$ RAILS_ENV=production docker-compose -f containers/docker-compose-production.yml exec web service cron status
[ ok ] cron is running.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3404 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJwOP1BBdklOCZ4f8v_uZDfO9o7_Cks5ulA8AgaJpZM4W1uzK>
.
|
OK, i changed the test digest code to:
I tried running |
OK, i ran
We should be testing |
Also I wonder if there's a version mismatch on the ActiveJob we're working with... it says there is no method |
OK i think i solved the template error above in 7ab9f68 |
Made a test for |
Digest emails now send when we press the test button on profile pages! Later: fix formatting/images/bio profile pics of the digest! Scheduled sends don't work - for some reason, the setting at https://publiclab.org/settings keeps getting switched off! It stays on for a little while but then gets disabled the next day... not sure how this happens! |
OK, attempted fix in #4523 -- it looks like the code was deleting ALL digest user tags for all users, rather than just for one user! Eek! Hopefully this fixes it! |
Digests still aren't sending, oddly. Need to look at logs more. The setting itself is all good now, i think. We just need to know why it's not triggering each day. |
It looks like the |
Maybe some clues here?
https://github.com/javan/whenever/search?utf8=%E2%9C%93&q=environment&type=
Seems there are some ways to set it...
…On Mon, Jan 14, 2019 at 11:34 PM Sebastian Silva ***@***.***> wrote:
It looks like the whenever runner is not finding the gems, because cron
gives it a clean environment ( without some environment variables we need
). I've attempted a fix with
https://github.com/publiclab/plots2/pull/4619/commits . How do you test
it?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#3404 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ9biQtEfO_qLd3ULXKMpndDJKnXiks5vDVpTgaJpZM4W1uzK>
.
|
ah! what about:
javan/whenever#732 (comment)
…On Wed, Jan 16, 2019 at 7:05 PM Jeffrey Warren ***@***.***> wrote:
Maybe some clues here?
https://github.com/javan/whenever/search?utf8=%E2%9C%93&q=environment&type=
Seems there are some ways to set it...
On Mon, Jan 14, 2019 at 11:34 PM Sebastian Silva ***@***.***>
wrote:
> It looks like the whenever runner is not finding the gems, because cron
> gives it a clean environment ( without some environment variables we need
> ). I've attempted a fix with
> https://github.com/publiclab/plots2/pull/4619/commits . How do you test
> it?
>
> —
> You are receiving this because you modified the open/close state.
> Reply to this email directly, view it on GitHub
> <#3404 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AABfJ9biQtEfO_qLd3ULXKMpndDJKnXiks5vDVpTgaJpZM4W1uzK>
> .
>
|
Trying it now at #4619, pushed to unstable |
I tried a couple of alternatives 4288bf7 adding to |
Hi!, With these variables (PATH, GEM_HOME, SECRET_KEY_BASE, and REDIS_URL), I don't get a trace in We're so close! Please merge #4619 and let's see! |
Was this it? 😊 |
Yes!!!!!!
…On Fri, Jan 25, 2019, 10:28 PM Sebastian Silva ***@***.*** wrote:
2019-01-26 00:00:04 1gnBOG-0004uP-2Z <= ***@***.*** H=(tycho2) [162.242.250.44] P=esmtp S=1635 ***@***.*** 2019-01-26 00:00:04 1gnBOG-0004uP-2Z ** ***@***.*** R=dnslookup T=remote_smtp H=mail.mapknitter.org [216.70.64.217] X=TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=no DN="OU=Domain Control Validated,CN=*.accessdomain.com": SMTP error from remote mail server after RCPT ***@***.***>: 550 Unrouteable address
2019-01-26 00:00:04 1gnBOG-0004uS-H9 <= <> R=1gnBOG-0004uP-2Z U=Debian-exim P=local S=3050
2019-01-26 00:00:04 1gnBOG-0004uP-2Z Completed
2019-01-26 00:00:04 1gnBOG-0004uS-H9 ** ***@***.*** R=dnslookup T=remote_smtp H=mail.mapknitter.org [216.70.64.217] X=TL
S1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=no DN="OU=Domain Control Validated,CN=*.accessdomain.com": SMTP error from remote mail se
rver after RCPT ***@***.***>: 550 Unrouteable address 2019-01-26 00:00:04 1gnBOG-0004uS-H9 Frozen (delivery error message) 2019-01-26 00:00:21 1gnBOX-0004v7-1J <= ***@***.*** H=(localhost.localdomain) [172.27.0.5] P=esmtp S=2818 ***@***.***
2019-01-26 00:00:22 1gnBOY-0004vE-3m <= ***@***.*** H=(localhost.localdomain) [172.27.0.5] P=esmtp S=10122 id=5c4b
***@***.*** 2019-01-26 00:00:22 1gnBOY-0004vI-CC <= ***@***.*** H=(localhost.localdomain) [172.27.0.5] P=esmtp S=2572 ***@***.*** 2019-01-26 00:00:22 1gnBOY-0004vE-3m => ***@***.*** R=dnslookup T=remote_smtp H=ASPMX.L.GOOGLE.COM [172.217.197.27] X=TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256 CV=yes DN="C=US,ST=California,L=Mountain View,O=Google LLC,CN=mx.google.com" C="250 2.0.0 OK 154
8460822 d22si526751qvf.130 - gsmtp" 2019-01-26 00:00:22 1gnBOY-0004vE-3m Completed
Was this it? 😊
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#3404 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ8hJbREDavOh6yWxOgIEWA32qCaBks5vG68OgaJpZM4W1uzK>
.
|
The digest emails are currently not being sent.
ArgumentError: wrong number of arguments (given 0, expected 1)
is shown on Sidekiq dashboard (https://publiclab.org/sidekiq/retries).The text was updated successfully, but these errors were encountered: