Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2237 (closed defect: fixed)

Opened 6 years ago

Last modified 5 years ago

call_on_startup/shutdown should be called after config has been initialized

Reported by: kikidonk Owned by:
Priority: normal Milestone: 2.1a2
Component: TurboGears Version: trunk
Severity: normal Keywords:
Cc:

Description

In tg/configuration.py http://trac.turbogears.org/browser/trunk/tg/configuration.py#L409

The call_on_startup and call_on_shutdown are called before init_config() is called

This means that I can't init stuff that i need to configure via my config file in those hooks (i'm thinking about turbomail or tgscheduler).

I think the fix would be to move the self.setup_startup_and_shutdown() after all init is done (at the end of load_environment)

Change History

comment:1 Changed 6 years ago by mramm

  • Milestone changed from 2.0rc1 to 2.0rc2

comment:2 Changed 5 years ago by kikidonk

Any news on this ticket ? The fix is trivial and it unbreaks a lot of cases..

comment:3 Changed 5 years ago by percious

  • Status changed from new to closed
  • Resolution set to fixed

Sorry this took so long. After triaging the docs tickets out of here, i realized this was here. It has been implemented in:  http://bitbucket.org/turbogears/tg-dev/changeset/cc14d7c6d21f/

cheers. -chris

Note: See TracTickets for help on using tickets.