using util:eval-async in module failed

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

using util:eval-async in module failed

محمد جواد حسنی
Dear all,

When util:eval-async is called in a function in a module, its failed to execute query. But it execute same query in a xql file or in a function in it.

My exist-db version is 3.1.0 .

Thanks.




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: using util:eval-async in module failed

Adam Retter
I would avoid util:eval-async, I suspect it is not well constructed or
tested. Instead I would suggest to just use util:eval if you need it.

On 5 April 2017 at 09:36, محمد جواد حسنی <[hidden email]> wrote:

> Dear all,
>
> When util:eval-async is called in a function in a module, its failed to
> execute query. But it execute same query in a xql file or in a function in
> it.
>
> My exist-db version is 3.1.0 .
>
> Thanks.
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



--
Adam Retter

eXist Developer
{ United Kingdom }
[hidden email]
irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: using util:eval-async in module failed

محمد جواد حسنی
I want eval a query in background to speed up response to client.
Are there any solution to do it?

Tanks.

On Wed, Apr 5, 2017 at 6:10 PM Adam Retter <[hidden email]> wrote:
I would avoid util:eval-async, I suspect it is not well constructed or
tested. Instead I would suggest to just use util:eval if you need it.

On 5 April 2017 at 09:36, محمد جواد حسنی <[hidden email]> wrote:
> Dear all,
>
> When util:eval-async is called in a function in a module, its failed to
> execute query. But it execute same query in a xql file or in a function in
> it.
>
> My exist-db version is 3.1.0 .
>
> Thanks.
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Exist-open mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/exist-open
>



--
Adam Retter

eXist Developer
{ United Kingdom }
[hidden email]
irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: using util:eval-async in module failed

Adam Retter
Just before we continue, can you tell me what the error was with
util:eval-async that you got.

On 5 April 2017 at 09:53, محمد جواد حسنی <[hidden email]> wrote:

> I want eval a query in background to speed up response to client.
> Are there any solution to do it?
>
> Tanks.
>
> On Wed, Apr 5, 2017 at 6:10 PM Adam Retter <[hidden email]> wrote:
>>
>> I would avoid util:eval-async, I suspect it is not well constructed or
>> tested. Instead I would suggest to just use util:eval if you need it.
>>
>> On 5 April 2017 at 09:36, محمد جواد حسنی <[hidden email]> wrote:
>> > Dear all,
>> >
>> > When util:eval-async is called in a function in a module, its failed to
>> > execute query. But it execute same query in a xql file or in a function
>> > in
>> > it.
>> >
>> > My exist-db version is 3.1.0 .
>> >
>> > Thanks.
>> >
>> >
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Check out the vibrant tech community on one of the world's most
>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> > _______________________________________________
>> > Exist-open mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/exist-open
>> >
>>
>>
>>
>> --
>> Adam Retter
>>
>> eXist Developer
>> { United Kingdom }
>> [hidden email]
>> irc://irc.freenode.net/existdb



--
Adam Retter

eXist Developer
{ United Kingdom }
[hidden email]
irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: using util:eval-async in module failed

محمد جواد حسنی
I put httpclient:post in util:eval-async to send a message to telegram. Its work correctly when executed in the eXide. Then i put the code in a function in a module. When i import  module and call the function no message received in telegram. 
Also when i changed util:eval-async to util:eval in the function, its work correctly(then code evaluated successfully) and i received the message in telegram.
I confused what is happened when i put the util:eval-async in the module function !!!!!


On Wed, Apr 5, 2017 at 10:09 PM Adam Retter <[hidden email]> wrote:
Just before we continue, can you tell me what the error was with
util:eval-async that you got.

On 5 April 2017 at 09:53, محمد جواد حسنی <[hidden email]> wrote:
> I want eval a query in background to speed up response to client.
> Are there any solution to do it?
>
> Tanks.
>
> On Wed, Apr 5, 2017 at 6:10 PM Adam Retter <[hidden email]> wrote:
>>
>> I would avoid util:eval-async, I suspect it is not well constructed or
>> tested. Instead I would suggest to just use util:eval if you need it.
>>
>> On 5 April 2017 at 09:36, محمد جواد حسنی <[hidden email]> wrote:
>> > Dear all,
>> >
>> > When util:eval-async is called in a function in a module, its failed to
>> > execute query. But it execute same query in a xql file or in a function
>> > in
>> > it.
>> >
>> > My exist-db version is 3.1.0 .
>> >
>> > Thanks.
>> >
>> >
>> >
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Check out the vibrant tech community on one of the world's most
>> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> > _______________________________________________
>> > Exist-open mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/exist-open
>> >
>>
>>
>>
>> --
>> Adam Retter
>>
>> eXist Developer
>> { United Kingdom }
>> [hidden email]
>> irc://irc.freenode.net/existdb



--
Adam Retter

eXist Developer
{ United Kingdom }
[hidden email]
irc://irc.freenode.net/existdb

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open