Re: Func Timelimite ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Milton Paiva Neto wrote:
Is there any time limit in Func ?
If there is a time limite, is there a way to increase the time limit
inside a module ?

Because I am trying the command:


------------------------------
def test(self,startingPackageNumber):
        import commands
        return list([ { package.split(" ")[0] : commands.getoutput("rpm
-V " + package.split(" ")[0]).split("\n") } for package in
self.inventory()[0:600] ])
For starters -- This kind of all-in-one-line list comprehension code is pretty heinous, BTW... I'd strongly recommend writing things like this over the course of several lines and assigning things to descriptive variable names.

There's a change that the way you are writing your loop is calling self.inventory more than once, though I'm really not sure what your code is doing from the small bit you have posted.

Yes, Func's remote calls have a timeout unless you use the asynchronous mode and polling for results. The timeout is just the socket timeout.
Look at async usage here in the first block:

https://fedorahosted.org/func/wiki/AsyncUsage




------------------------------

When I use a list of 190 or less files it works fine, but after 200 it
begins to show the message "REMOTE_ERROR".

------------------------------
{'milton.ca': ['REMOTE_ERROR',
               'exceptions.TypeError',
               'test() takes exactly 2 arguments (1 given)',
               '  File
"/usr/lib/python2.5/site-packages/func/minion/server.py", line 136, in
__call__\n    rc = self.__method(*args)\n']}
------------------------------








_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux