Re: [uWSGI] Cron.rst and curl-cron

2018-05-07 Thread Aleks
Hi.

Am 06.05.2018 um 20:05 schrieb Roberto De Ioris:
> 
>> Hi.
>>
>> I have seen that a lot of distributions offer the uwsgi plugin curl_cron
>>
>> https://github.com/unbit/uwsgi/tree/master/plugins/curl_cron
>>
>> but I haven't seen any doc in
>>
>> https://github.com/unbit/uwsgi-docs/blob/master/Cron.rst
>>
>> Is it worth to make a pull request to the doc or is this plugin not
>> active maintained?
>>
>> The same question belongs to alarm_curl.
>>
>> https://github.com/unbit/uwsgi/tree/master/plugins/alarm_curl

[snipp]

> 
> Hi Aleks, yep the plugin is still maintained, so a pull request will be
> really appreciated :)

Perfect.

My first question is how can I add a payload or a Post request to a
curl-cron job.

I haven't seen CURLOPT_POSTFIELDS or any other option for posting a
request in

https://github.com/unbit/uwsgi/blob/master/plugins/curl_cron/curl_cron.c

similar to

https://github.com/unbit/uwsgi/blob/master/plugins/alarm_curl/alarm_curl_plugin.c

I wan't to run a health check with a json payload in curl-cron.

I assume this is not possible yet just a GET Call is possible right?

I think this is the right syntax.

```
[uwsgi]
; every two hours
cron-curl= 0 -2 -1 -1 -1 https://my.domain.com/url
```

How about to add a similar syntax as in alarm_curl or cron2

https://uwsgi-docs.readthedocs.io/en/latest/AlarmSubsystem.html#curl
https://uwsgi-docs.readthedocs.io/en/latest/Cron.html#new-syntax-for-cron-options

```
[uwsgi]
; every two hours
; simple GET Request
cron-curl2= minute=0,hour=-2,domain=my.domain.com /url
; Post request
cron-curl2=
minute=0,hour=-2,domain=my.domain.com,method=POST,payload=THEPAYLOAD,headers="Content-Type:
application/json;User-Agent: my Cron Agent 007" /url

```

I will create a new issue for this feature request.

https://github.com/unbit/uwsgi/issues/1785

Regards
Aleks
___
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi


Re: [uWSGI] Cron.rst and curl-cron

2018-05-06 Thread Roberto De Ioris

> Hi.
>
> I have seen that a lot of distributions offer the uwsgi plugin curl_cron
>
> https://github.com/unbit/uwsgi/tree/master/plugins/curl_cron
>
> but I haven't seen any doc in
>
> https://github.com/unbit/uwsgi-docs/blob/master/Cron.rst
>
> Is it worth to make a pull request to the doc or is this plugin not
> active maintained?
>
> The same question belongs to alarm_curl.
>
> https://github.com/unbit/uwsgi/tree/master/plugins/alarm_curl
>
> Best regards
> Aleks
> ___


Hi Aleks, yep the plugin is still mainteined, so a pull request will be
really appreciated :)

-- 
Roberto De Ioris
http://unbit.com
___
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi


[uWSGI] Cron.rst and curl-cron

2018-05-06 Thread Aleks
Hi.

I have seen that a lot of distributions offer the uwsgi plugin curl_cron

https://github.com/unbit/uwsgi/tree/master/plugins/curl_cron

but I haven't seen any doc in

https://github.com/unbit/uwsgi-docs/blob/master/Cron.rst

Is it worth to make a pull request to the doc or is this plugin not
active maintained?

The same question belongs to alarm_curl.

https://github.com/unbit/uwsgi/tree/master/plugins/alarm_curl

Best regards
Aleks
___
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi