Timeline for Why would custom module code fail when called from drush but work fine when invoked from cron button in admin/config/system/cron?
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 23, 2017 at 12:41 | history | edited | CommunityBot |
replaced http://stackoverflow.com/ with https://stackoverflow.com/
|
|
Jan 6, 2016 at 11:58 | comment | added | therobyouknow | I could try to look at implementing further checks but I think I'd be adjusting the way the libraries I'm using work themselves and I don't think this is necessary at the moment. I'm using the S3fsStreamWrapper class provided in Drupal Contrib module s3fs and the setup steps I did are here | |
Jan 6, 2016 at 11:31 | comment | added | therobyouknow | Accepted answer. The root cause I think is that the clock on my VM compared to that on S3 is too different so S3 raises an error but the error is reported in the contents of the file that I'm supposed to be reading from S3 which explains why the value being written was flagged up as being too large. So kenorb was right about my code being incorrect - I have adjusted it to handle this scenario by checking the number of columns - which would be 1 if this were the case in this error, rather than the 19 I'm expecting for my case. | |
Jan 6, 2016 at 11:27 | vote | accept | therobyouknow | ||
Jan 5, 2016 at 9:57 | comment | added | therobyouknow | +1 upvote on answer and +1 on your comments. Just following up on this after the holidays, sorry for lack of further feedback since last time. I'm re-reading the answer - this is a really good response kenorb - there are some good leads for me to follow. Good point about storing the error message in the username issue - I think that is definitely something I should correct in my code, also the environmental differences thoughts (also from greg_1_anderson). | |
Dec 22, 2015 at 20:49 | history | edited | kenorb | CC BY-SA 3.0 |
Expanding post a bit.
|
Dec 22, 2015 at 20:44 | comment | added | kenorb | @therobyouknow If you're using Amazon S3 services and your import has anything to do with it, check my updated answer. | |
Dec 22, 2015 at 20:43 | history | edited | kenorb | CC BY-SA 3.0 |
Expanding post a bit.
|
Dec 22, 2015 at 20:29 | comment | added | kenorb |
@therobyouknow During cron probably the same functions weren't executed the same way as you do now, as it seems you're passing the wrong parameters when invoking via drush . If you can provide further info, such as content of _mywebsite_externalsystem_integration_create_new_user() function, it'll be easier to know what's going on. Especially the part how $edit array is generated for user_save() . In my opinion it's definitely human error in the code, not PHP or MySQL configuration. So check how do you implement your code.
|
|
Dec 22, 2015 at 19:58 | comment | added | therobyouknow | "doesn't seems you're running cron task from your code (but executing custom drush command), so nothing to do with it, that's why it's not happening during your cron.php." Yes correct as I had said in the question: I am now running my code from a custom drush command (where I am now seeing these errors) but was running the same code from cron (where I did not see these errors) | |
Dec 22, 2015 at 19:19 | history | answered | kenorb | CC BY-SA 3.0 |