Re: [Mojolicious] Re: Mojolicious on Openshift

2015-12-02 Thread Алексей Орлов
Sebastian, I have a question.

How can I use ENV variables within  my config file to use their with
hypnotoad?
I want to something like this:

{
  listen => ["http://$ENV{OPENSHIFT_DIY_IP}:$ENV{OPENSHIFT_DIY_PORT};]
}

2015-12-02 15:19 GMT+03:00 sri :

> Look repo
>> 
>>  and
>> a working example is here .
>>
>
> You shouldn't be using Morbo like that, it's only a development server.
> For production use on a cloud platform you usually want the daemon or
> prefork commands.
>
>
> http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Built-in-web-server
>
> --
> sebastian
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Mojolicious" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mojolicious/NopgqpfO9Yc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> mojolicious+unsubscr...@googlegroups.com.
> To post to this group, send email to mojolicious@googlegroups.com.
> Visit this group at http://groups.google.com/group/mojolicious.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Re: Mojolicious on Openshift

2015-12-02 Thread Aniruddha Pandit
Hello,

I tried the steps but I am not getting the thing to work yet. 

The instructions on getting the code (scripts, templates, etc) folder into 
diy is missing I believe ? 

How do I get that code into the appropriate folder from your github to the 
diy folder. Cloning the github to the directory also just made additional 
sub folders.

Your help is greatly appreciated.

Thanks,

Anir

On Monday, 30 November 2015 12:22:00 UTC, Алексей Орлов wrote:
>
> Hi!
>
> Look repo  and 
> a working example is here .
>
> понедельник, 30 ноября 2015 г., 14:20:22 UTC+3 пользователь Aniruddha 
> Pandit написал:
>>
>> Hello All,
>>
>> I have created a Mojolicious application (not lite) on my local machine 
>> and it works flawlessly. The next logical step is to host in on a web 
>> hosting service. Considering that my database is MySQL and having heard 
>> that OpenShift is a good ( and free) service, I decided to use that. 
>>
>> I have searched for the past few weeks now for a proper How-To but have 
>> not found any that work. 
>>
>> I have tried the normal way, the DIY way, etc, but have not had any 
>> success at all. Is there a good guide / tutorial which anyone has used for 
>> putting up their Mojolicious Web App on Openshift ?
>>
>>
>> Thanks in advance for your help.
>>
>> Anir
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Request-ID logging possible with asynchronous request handling?

2015-12-02 Thread Heiko Jansen
I believe this question has been asked before and the person who asked was 
told that what he wanted wasn´t feasible - but I cannot right now find the 
conversation.
Also, maybe some influencing factor has changed so perhaps nowadays there 
is a solution possible for what follows?

Our HTTP front end (nginx with mod_txid) generates unique IDs for incoming 
requests. We pass this request ID onward to our main app and to a few back 
end systems who all include it in their log messages. Combining this with 
high resolution time stamps we´re able to trace a request through all 
systems and can, e.g., easily find out for error messages in back end 
systems what the user input in the corresponding HTTP request was. Logging 
is done via Log4perl and the request id is included in every log message 
through the MDC singleton in Log4perl.

Unfortunately this does not work when we make use of asynchronous request 
handling features in Mojolicious. The MDC store is process-global, but 
there are multiple requests being worked on in the same process. We could 
include the request ID manually in every log message we create, but that´s 
cumbersome and it still wouldn´t get the id in any message that´s generated 
directly by Mojolicious.

Since the log calls are method calls on the App instance and not on the 
controller there is apparently no way to access the request context even if 
we monkey-patch the log method in the app.

Still, it would come in really handy if what I´ve tried to describe could 
be made to work in Mojolicious.
Is there anything we´ve missed?
If not, are there any plans for changing Mojolicious internals which could 
enable us to get it to work?

Thx!
Heiko

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Re: Mojolicious on Openshift

2015-12-02 Thread Aniruddha Pandit
Ok. Got your code working. Now will work on getting my code up ! Thanks a 
tonne ! 

Anir

On Monday, 30 November 2015 12:22:00 UTC, Алексей Орлов wrote:
>
> Hi!
>
> Look repo  and 
> a working example is here .
>
> понедельник, 30 ноября 2015 г., 14:20:22 UTC+3 пользователь Aniruddha 
> Pandit написал:
>>
>> Hello All,
>>
>> I have created a Mojolicious application (not lite) on my local machine 
>> and it works flawlessly. The next logical step is to host in on a web 
>> hosting service. Considering that my database is MySQL and having heard 
>> that OpenShift is a good ( and free) service, I decided to use that. 
>>
>> I have searched for the past few weeks now for a proper How-To but have 
>> not found any that work. 
>>
>> I have tried the normal way, the DIY way, etc, but have not had any 
>> success at all. Is there a good guide / tutorial which anyone has used for 
>> putting up their Mojolicious Web App on Openshift ?
>>
>>
>> Thanks in advance for your help.
>>
>> Anir
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Re: Mojolicious on Openshift

2015-12-02 Thread Aniruddha Pandit
Sorry to bother you again.

When I updated the code with small changes (e.g. change in template) and I 
stopped the cartridge before trying git push, there are errors occurring 
when trying to stop the cartridge and I cannot get the cartridge to work 
again. Is this an issue with the stop code ? Where am I going wrong ?

Thanks

Anir

On Wednesday, 2 December 2015 09:42:39 UTC, Aniruddha Pandit wrote:
>
> Ok. Got your code working. Now will work on getting my code up ! Thanks a 
> tonne ! 
>
> Anir
>
> On Monday, 30 November 2015 12:22:00 UTC, Алексей Орлов wrote:
>>
>> Hi!
>>
>> Look repo  and 
>> a working example is here .
>>
>> понедельник, 30 ноября 2015 г., 14:20:22 UTC+3 пользователь Aniruddha 
>> Pandit написал:
>>>
>>> Hello All,
>>>
>>> I have created a Mojolicious application (not lite) on my local machine 
>>> and it works flawlessly. The next logical step is to host in on a web 
>>> hosting service. Considering that my database is MySQL and having heard 
>>> that OpenShift is a good ( and free) service, I decided to use that. 
>>>
>>> I have searched for the past few weeks now for a proper How-To but have 
>>> not found any that work. 
>>>
>>> I have tried the normal way, the DIY way, etc, but have not had any 
>>> success at all. Is there a good guide / tutorial which anyone has used for 
>>> putting up their Mojolicious Web App on Openshift ?
>>>
>>>
>>> Thanks in advance for your help.
>>>
>>> Anir
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Re: Mojolicious on Openshift

2015-12-02 Thread Aniruddha Pandit
Hello again,

I have tried a few times now and everytime I am getting the same problem.

When I try to change the code and do a new push, I am unable to stop the 
app and do a new push. I am constantly getting the following error when 
trying to stop or restart the app. The web console is also throwing the 
same error.

Failed to execute: 'control stop' for

/var/lib/openshift/565ed50189f5cf3ee75d/diy


Any ideas ?


Thanks,


Anir



On Wednesday, 2 December 2015 11:14:25 UTC, Aniruddha Pandit wrote:
>
> Sorry to bother you again.
>
> When I updated the code with small changes (e.g. change in template) and I 
> stopped the cartridge before trying git push, there are errors occurring 
> when trying to stop the cartridge and I cannot get the cartridge to work 
> again. Is this an issue with the stop code ? Where am I going wrong ?
>
> Thanks
>
> Anir
>
> On Wednesday, 2 December 2015 09:42:39 UTC, Aniruddha Pandit wrote:
>>
>> Ok. Got your code working. Now will work on getting my code up ! Thanks a 
>> tonne ! 
>>
>> Anir
>>
>> On Monday, 30 November 2015 12:22:00 UTC, Алексей Орлов wrote:
>>>
>>> Hi!
>>>
>>> Look repo  and 
>>> a working example is here .
>>>
>>> понедельник, 30 ноября 2015 г., 14:20:22 UTC+3 пользователь Aniruddha 
>>> Pandit написал:

 Hello All,

 I have created a Mojolicious application (not lite) on my local machine 
 and it works flawlessly. The next logical step is to host in on a web 
 hosting service. Considering that my database is MySQL and having heard 
 that OpenShift is a good ( and free) service, I decided to use that. 

 I have searched for the past few weeks now for a proper How-To but have 
 not found any that work. 

 I have tried the normal way, the DIY way, etc, but have not had any 
 success at all. Is there a good guide / tutorial which anyone has used for 
 putting up their Mojolicious Web App on Openshift ?


 Thanks in advance for your help.

 Anir

>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Re: Mojolicious on Openshift

2015-12-02 Thread sri

>
> Look repo 
> 
>  and 
> a working example is here .
>

You shouldn't be using Morbo like that, it's only a development server. For 
production use on a cloud platform you usually want the daemon or prefork 
commands.

  
  http://mojolicio.us/perldoc/Mojolicious/Guides/Cookbook#Built-in-web-server

--
sebastian 

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.