[web2py] Stuck in the queue (scheduler)

2018-11-09 Thread Dave S
I'm trying to add a second scheduler item of work.  At the moment, I seem 
to get the scheduler to run the new function some of the time, and to be 
stuck in the cue other times.

Here are some entries that are stuck:
591|uploader/default|predigest|main|QUEUED|predigest|bc0e5eaf-c8b7-4754-ae49
-7441a3704199|[]|{"pred_id": "1073"}|T|2018-11-09 22:38:56|2018-11-10 22:39:
07||0|0|86400|F|60|0|1|0|2018-11-09 22:39:07|ip-172-31-16-18#11138|
592|uploader/default|predigest|main|QUEUED|predigest|4c4db3a9-268d-4953-86f3
-7ef6bda79c58|[]|{"pred_id": "1073"}|T|2018-11-09 22:57:50|2018-11-10 22:57:
56||0|0|86400|F|60|0|1|0|2018-11-09 22:57:56|ip-172-31-16-18#11138|
593|uploader/default|predigest|main|QUEUED|predigest|9abb3d2c-4e45-4f97-89c4
-93e57e7870b6|[]|{"pred_id": "1073"}|T|2018-11-10 01:28:44|2018-11-11 01:28:
59||0|0|86400|F|60|0|1|0|2018-11-10 01:28:59|ip-172-31-16-18#11138|


They were cued with 
   cue = scheduler.queue_task( "predigest", start_time = ttime, period = 
86400, repeats=0,
 pvars=dict(pred_id = pred_id))


Here's one that ran (and failed; I'd like to see if I fixed it, but I'm 
 stuck in the queue).
590|uploader/default|predigest|main|FAILED|predigest|bcac08fe-dc2e-4202-af08
-48f457067939|[]|{"pred_id": "1073"}|T|2018-11-09 20:58:43|2018-11-10 20:58:
49||0|0|86400|F|60|0|0|1|2018-11-09 20:58:49|ip-172-31-16-18#11138|

Meanwhile, the original function is being picked up at the time it's queued 
for., and task_worker.last_heartbeat is ticking.

Does anyone see why these are stuck?

/dps

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Column order in SQLFORM

2018-11-09 Thread Anthony
On Friday, November 9, 2018 at 11:13:51 AM UTC-5, Yann Dulondel wrote:
>
> Seem to be in the header had put bulk_id instead of articles.bulk_id.
> But i still have two issues
>
>- First when i click on header column bulk_id the order the column 
>change
>
> If you don't want the grid to be sortable, you can do SQLFORM.grid(..., 
sortable=False). Note, that will disable sorting on all of the columns. To 
disable sorting on just a single column, you would have to use the 
server-side DOM to manually remove the anchor tag from the specific column 
heading. 

>
>- In the list is displayed the name of the record and his id
>
>
The display is controlled by the "represent" attribute of the field. If 
this field is a "reference" field, its default "represent" attribute is 
based on the "format" attribute of the referenced table. So, you can either 
specify an explicit "represent" attribute for the Bulkhead field to 
override its default, or change the "format" attribute of the referenced 
table (assuming this is a reference field).

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Issue with pydal - default

2018-11-09 Thread Dave S


On Friday, November 9, 2018 at 5:31:18 AM UTC-8, Ben Duncan wrote:
>
> Ok, I'm checking my DAL layouts with s simply pydal test program and I've 
> run into this:
>
> [postgres@su-postgres-ben-3 mec_layouts]$ ./pydaltest2.py
> Traceback (most recent call last):
>   File "./pydaltest2.py", line 289, in 
> Field('created_datetime', type='datetime', default=request.now),
> NameError: name 'request' is not defined
>


The variable request  is a web2py global, but when you're running pydal 
standalone you don't have the web2py globals.

You might try

import datetime
if "request" not in globals():
   request["now"] = datetime.datetime.now()


before your table defines.  (Or, if you always be running standalone, just 
change the default.)


/dps

The top of my program looks like :
>
> import os, sys, string, copy, time
> import getopt
> from types import *
>
>
> from pydal import DAL , Field
> db = DAL("postgres://postgres:postgres@localhost:7103/ac03303_live", 
> pool_size=10, migrate_enabled=False, fake_migrate_all=True )
>
> db.define_table ...
> db.define_table ... (etc)
> db.define_table('cookie_s',
> Field('company_number', type='reference company', ondelete='CASCADE'),
> Field('prid', type='integer'),
> Field('value', type='string', length=255),
> Field('java_ready', type='boolean'),
> Field('content', type='string', length=255),
> Field('created_datetime', type='datetime', default=request.now),
> Field('expire', type='datetime'),
> Field('machine_id', type='string', length=255),
> Field('browser_session', type='integer'),
> Field('server_session', type='integer'),
> primarykey=['company_number','prid'],
> migrate=False)
>
> It's blowing up on the
> Field('created_datetime', type='datetime', default=request.now), 
>
> What Am I doing wrong ?
>
> Thanks ..
>
>
>
> *Ben Duncan*
> DBA / Chief Software Architect 
> Mississippi State Supreme Court
> Electronic Filing Division
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Column order in SQLFORM

2018-11-09 Thread Yann Dulondel
Seem to be in the header had put bulk_id instead of articles.bulk_id.
But i still have two issues

   - First when i click on header column bulk_id the order the column change
   - In the list is displayed the name of the record and his id


Le vendredi 9 novembre 2018 16:51:44 UTC+1, Yann Dulondel a écrit :
>
> Hi all
> I have a strange behaviors from view model.
> The columns are not in the same order when reloading page.See the bulk_id 
> column
> I believe that i understood how columns order was setup: inverse order of 
> creation in contoller
>
> myfields={db.articles.bulk_id,db.articles.dossier,db.articles.date_sortie,db.articles.conteneur,db.articles.cod_ref
>  Corresponding colmns title= Bulk_id,Braid reference,Fitting date,numéro 
> de conteneur,numéro de flexi
> First load
> Reloading page
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Column order in SQLFORM

2018-11-09 Thread Yann Dulondel
Hi all
I have a strange behaviors from view model.
The columns are not in the same order when reloading page.See the bulk_id 
column
I believe that i understood how columns order was setup: inverse order of 
creation in contoller
myfields={db.articles.bulk_id,db.articles.dossier,db.articles.date_sortie,db.articles.conteneur,db.articles.cod_ref
 Corresponding colmns title= Bulk_id,Braid reference,Fitting date,numéro de 
conteneur,numéro de flexi
First load
Reloading page

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Form string display mask

2018-11-09 Thread Yann Dulondel
Sorry Mr Di Pierro for answering so late, i was very busy on other project.
Thank for your time.
Yann

Le vendredi 14 septembre 2018 15:05:22 UTC+2, Yann Dulondel a écrit :
>
> Hello,
> My user have to enter container number.
> The container number is a string of lenght 11 char
> The data for example is FCIU5808141 that must be display as FCIU 580 814/1
>
> In my c/s application i just have to specify a display mask  as ' @@@ 
> @@@/@'
> Does exists something like that.
> I use the format for date in web2y work fine and try to use format to 
> solve with no success.
>
> Yann
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Issue with pydal - default

2018-11-09 Thread Ben Duncan
Ok, I'm checking my DAL layouts with s simply pydal test program and I've
run into this:

[postgres@su-postgres-ben-3 mec_layouts]$ ./pydaltest2.py
Traceback (most recent call last):
  File "./pydaltest2.py", line 289, in 
Field('created_datetime', type='datetime', default=request.now),
NameError: name 'request' is not defined

The top of my program looks like :

import os, sys, string, copy, time
import getopt
from types import *


from pydal import DAL , Field
db = DAL("postgres://postgres:postgres@localhost:7103/ac03303_live",
pool_size=10, migrate_enabled=False, fake_migrate_all=True )

db.define_table ...
db.define_table ... (etc)
db.define_table('cookie_s',
Field('company_number', type='reference company', ondelete='CASCADE'),
Field('prid', type='integer'),
Field('value', type='string', length=255),
Field('java_ready', type='boolean'),
Field('content', type='string', length=255),
Field('created_datetime', type='datetime', default=request.now),
Field('expire', type='datetime'),
Field('machine_id', type='string', length=255),
Field('browser_session', type='integer'),
Field('server_session', type='integer'),
primarykey=['company_number','prid'],
migrate=False)

It's blowing up on the
Field('created_datetime', type='datetime', default=request.now),

What Am I doing wrong ?

Thanks ..



*Ben Duncan*
DBA / Chief Software Architect
Mississippi State Supreme Court
Electronic Filing Division

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] MongoDB

2018-11-09 Thread lbjc1978
I keep getting this information on my terminal.
WARNING:pyDAL:Attributes 'required', 'cache' and 'cacheable' are 
unsupported by MongoDB
Enter code here...


How can I solve it?
Regards

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: HOW TO SET A DEFAULT VALUE FOR A TABLE REFERENCED IN ANOTHER TABLE

2018-11-09 Thread mostwanted
Thanks

On Friday, November 9, 2018 at 2:14:55 PM UTC+2, tim.n...@conted.ox.ac.uk 
wrote:
>
> You set the default in client:
>
> db.define_table(
> 'client',
> Field('city', db.city, default='Value here'),
> )
>
>
> On Friday, 9 November 2018 04:59:23 UTC, mostwanted wrote:
>>
>> if i have 2 table client and city and have city referenced in client, how 
>> do i set a default value for city that will appear in client?
>> I tried setting default in city hoping it will show as a default value in 
>> client but its not showing!
>> I hope this explanation of the problem is clear enough it doesn't need a 
>> code example.
>>
>> Thank You
>>
>> Mostwanted
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Glyphicons still not showing in version 2.17.1-stable

2018-11-09 Thread mostwanted
Wow Thanks

On Friday, November 9, 2018 at 10:29:08 AM UTC+2, Константин Комков wrote:
>
> If you have gluphicons you can make like that:
> CSS
> .glyphicon-user{display:block;float:left;width:*your picture width* px;
> height:*your picture **height* px;background-image:url(/*name of your app*
> /static/images/*your picture name*.png);background-repeat: no-repeat;}
>
> [image: ic.png]
> HTML
>  class="glyphicon-user">Профиль
>
> среда, 7 ноября 2018 г., 12:43:53 UTC+3 пользователь mostwanted написал:
>>
>> Was a solution ever provided/created for the not appearing glyphicons? 
>> Massimo promised a solutions to this last year (2017): 
>> https://groups.google.com/forum/#!msg/web2py/CSA-p4OSKM0/mziFoZ3KBQAJ;context-place=topic/web2py/Eii2yOpd_TU
>>
>> Whats the way around this problem?
>>
>> Mostwanted
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: HOW TO SET A DEFAULT VALUE FOR A TABLE REFERENCED IN ANOTHER TABLE

2018-11-09 Thread tim . nyborg
You set the default in client:

db.define_table(
'client',
Field('city', db.city, default='Value here'),
)


On Friday, 9 November 2018 04:59:23 UTC, mostwanted wrote:
>
> if i have 2 table client and city and have city referenced in client, how 
> do i set a default value for city that will appear in client?
> I tried setting default in city hoping it will show as a default value in 
> client but its not showing!
> I hope this explanation of the problem is clear enough it doesn't need a 
> code example.
>
> Thank You
>
> Mostwanted
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Web server with support for chunked transfer encoding

2018-11-09 Thread icodk
Printing the  request object shows something like:
< gluon.rocket.ChunkedReader object at 0x00AFFB10 > ,

So there are signes that it is actually supported
Also :
'wsgi_input':  < gluon.rocket.ChunkedReader object at 0x00AFFB10 > ,
can be found in the request
I am using source with pg8000 installed.
The reason I use chunked tranfer  is because my device is small so I can't 
buffer all the data to see how long it is, and POST it with Content lenght
header. Of cours I could use enginx. Rocket is nice for development.




On Thursday, November 8, 2018 at 5:18:41 PM UTC+1, icodk wrote:
>
> Tried with Rocket  No error but request.args and request.vars are empty
> The client sends:
>
> POST /controller/statdata HTTP/1.1
> Host: myserver.com:8082
> Content-Type:application/json
> Transfer-Encoding: chunked
>
> and then sends the chunked data
>
> Rokets log shows:
> 192.168.1.3, 2018-11-08 16:46:57, POST, /controller/statdata, HTTP/1.1, 
> 200, 0.017997
>
> Any idea on the subject are welcome
>
>
>
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Glyphicons still not showing in version 2.17.1-stable

2018-11-09 Thread Константин Комков
If you have gluphicons you can make like that:
CSS
.glyphicon-user{display:block;float:left;width:*your picture width* px;
height:*your picture **height* px;background-image:url(/*name of your app*/
static/images/*your picture name*.png);background-repeat: no-repeat;}
HTML
Профиль

среда, 7 ноября 2018 г., 12:43:53 UTC+3 пользователь mostwanted написал:
>
> Was a solution ever provided/created for the not appearing glyphicons? 
> Massimo promised a solutions to this last year (2017): 
> https://groups.google.com/forum/#!msg/web2py/CSA-p4OSKM0/mziFoZ3KBQAJ;context-place=topic/web2py/Eii2yOpd_TU
>
> Whats the way around this problem?
>
> Mostwanted
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.