hi list... i am quite new to pylons, it is great fun learning & using it...
on a new install i have this this deprecation warning at startup: ===================================== paster serve --reload development.ini Starting subprocess with file monitor /home/alain/pylons_env/lib/python2.4/Pylons-0.9.5-py2.4.egg/pylons/ wsgiapp.py:249: DeprecationWarning: SessionMiddleware is moving to beaker.middleware in 0.8 app = SessionMiddleware(app, config.global_conf, **config.app_conf) /home/alain/pylons_env/lib/python2.4/Pylons-0.9.5-py2.4.egg/pylons/ wsgiapp.py:254: DeprecationWarning: CacheMiddleware is moving to beaker.middleware in 0.8 app = CacheMiddleware(app, config.global_conf, **config.app_conf) Starting server in PID 7329. serving on 0.0.0.0:5000 view at http://127.0.0.1:5000 ======================================== what changes in the code is necessary to come back on the good side of deprecation world? and as long as i am here, an init.d script to start a pylons app with workingenv i did it because i could not find any, it works well for me ============================================================== #! /bin/sh ### BEGIN INIT INFO # Provides: <my_app> application instance # Required-Start: $all # Required-Stop: $all # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: starts the first instance for <my_app> app # Description: starts the first instance for <my app> app using start-stop-daemon ### END INIT INFO ############### EDIT ME ############################################## # path to workingenv install if any PYTHONPATH=/home/<my_home_dir>/pylons_env/lib/python2.4 # path to app APP_PATH=/home/<my_home_dir>/pylons_sites/<my_app_name> # path to paster bin DAEMON=/home/<my_home_dir>/pylons_env/bin/paster # startup args DAEMON_OPTS=" serve --log-file <logfile>.log --server-name=main production.ini" # script name NAME=<my_rc_script.sh> # app name DESC= <my_app> # pylons user RUN_AS=<user to switch to after startup> PID_FILE=/var/run/paster.pid ############### END EDIT ME ############################################## test -x $DAEMON || exit 0 set -e case "$1" in start) echo -n "Starting $DESC: " start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background --pidfile $PID_FILE --make-pidfile --exec $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --stop --pidfile $PID_FILE echo "$NAME." ;; restart|force-reload) echo -n "Restarting $DESC: " start-stop-daemon -d $APP_PATH -c $RUN_AS --start --background --pidfile $PID_FILE --make-pidfile --exec $DAEMON -- $DAEMON_OPTS sleep 1 start-stop-daemon --stop --pidfile $PID_FILE echo "$NAME." ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 ====================================================================== --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
