Hi,
Thanks, this seems to work, but ran into some problems, not sure who
to blame :-)
Using Newtonsoft.Json to serialize my .NET class ... and it works.
Should be valid json:
{"retries":0,"task":"process-quarantine","args":{"use_alt":false,"altrecipients"
:"","learn":true,"salearn_as":"spam","todelete":false,"release":false,"message_i
d":["37EC6193BEA.A97A0"]},"expires":null,"eta":null,"id":"f23cf671-c3a5-4637-b9a
3-b45a54e88663"}
The celery process however dont like it at all ... it throws an
Exception and its because of the format of the above json.
{"retries":0,"task":"process-quarantine","args":[{"use_alt":false,"altrecipients
":"","learn":true,"salearn_as":"spam","todelete":false,"release":false,"message_
id":["37EC6193BEA.A97A0"]}],"expires":null,"eta":null,"id":"f23cf671-c3a5-4637-b
9a3-b45a54e88663"}
Its having problems ... but if I take the json and take the "args" and
surround it with [], then it works.
Heres the .NET code: https://gist.github.com/1689498
It could be me that are doing something wrong ..... but both apears to
be valid if http://jsonlint.com/ can be trusted.
mvh
On Fri, Jan 27, 2012 at 11:58 AM, Andrew Colin Kissa
<[email protected]> wrote:
>
> On 27 Jan 2012, at 12:46 PM, Mikael Syska wrote:
>
>> What information do I need to pass along in the Message object? I
>> looked at a message the webinterface sends and there "ALOT" of
>> information.
>
> The processquarantine task which you most likely will use does not
> take many options it just requires a dictionary / hash with the following
>
> message_id - string
> todelete - boolean
> learn - boolean
> salearn_as - spam, ham, forget
> use_alt - boolean
> altrecipients - string, multiple values separated by commas
>
> To take directly to the MQ you will have to generate amqp messages
> and send them to the queue for the host on which the message is
> quarantined.
>
> Hope that helps.
>
> - A
>
>
> --
> www.baruwa.org
>
>
>
> _______________________________________________
> Keep Baruwa FREE - http://pledgie.com/campaigns/12056
_______________________________________________
Keep Baruwa FREE - http://pledgie.com/campaigns/12056