Saturday, August 2, 2014

Google App Engine: skipping complete directory via skip_files


I forgot all about the skip_files in app.yaml and asked my favorite search engine what to do. A number of the top pages returned made it unnecessarily complicated. Just do this to skip directories (.idea and tools in this example):

...
skip_files:
- ^(.*/)?#.*#$
- ^(.*/)?.*~$
- ^(.*/)?.*\.py[co]$
- ^(.*/)?.*/RCS/.*$
- ^(.*/)?\..*$
- ^\.idea$
- ^tools$
...

(These are top-level directories within my app engine project.)

Add -v to your appcfg.py ... update ... invocation to confirm, from messages like

2014-08-02 09:19:20,424 INFO appcfg.py:2568 Ignoring directory '.idea': Directory matches ignore regex. 
2014-08-02 09:19:20,425 INFO appcfg.py:2426 Processing file 'app.yaml' 
2014-08-02 09:19:20,426 INFO appcfg.py:2426 Processing file 'index.yaml' 
2014-08-02 09:19:20,426 INFO appcfg.py:2426 Processing file 'main.py' 
2014-08-02 09:19:20,426 INFO appcfg.py:2561 Ignoring file 'main.pyc': File matches ignore regex. 
2014-08-02 09:19:20,426 INFO appcfg.py:2426 Processing file 'not_found.py' 
2014-08-02 09:19:20,427 INFO appcfg.py:2568 Ignoring directory 'tools': Directory matches ignore regex. 
2014-08-02 09:19:20,429 INFO appcfg.py:2426 Processing file 'static/Chart.min.js' 
...

8 comments:

Arjun kumar said...

Thank you so much sharing this incredible content. Your unique article helps me to update myself with the current technology. Keep up this by sharing more articles. This might help many like me to seek the best Big Data Training

Roshini RS said...

This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic.
Regards,
Informatica training in chennai

Jay Khimani said...

Thanks. Clear and concise.

Raphaƫl Doursenaud said...

.idea is not needed.
It's already matched by the hidden files directive! (^(.*/)?\..*$)

Shalini said...

Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your.
Digital Marketing Company in India
seo Company in India

Riccardo Carlesso said...

Jeff, please remove the 3 spammers comments here (Arjun, Roshini, Shalini) ;-)

Thanks. Simple, concise. Love it.

sunitha vishnu said...

It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
Android Training in Chennai
Ios Training in Chennai

jessica said...

This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
Mobile Marketing Service
Mobile Marketing Companies
Sms API
Texting API