Skip to content

Commit

Permalink
[coopengo_modules/debug] Allow to autoprofile wizards
Browse files Browse the repository at this point in the history
  • Loading branch information
JCavallo authored and nicoe committed Sep 13, 2023
1 parent ff82d69 commit 374f1c3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions coopengo_modules/debug/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,12 @@ def wrapped(cls, *args, **kwargs):
wrapped.__origin_function = f.__origin_function
return wrapped

for key, data in config.items('auto_profile'):
for _, data in config.items('auto_profile'):
model, methods = data.split(':')
model = model.strip()
*pool_type, model = model.strip().split('/')
pool_type = (pool_type or ['model'])[0]

Model = pool._pool[pool.database_name].get('model').get(model)
Model = pool._pool[pool.database_name].get(pool_type).get(model)
for method in methods.split(','):
method = method.strip()
logger.warning('Enabling auto-profile for %s -> %s' % (
Expand Down

0 comments on commit 374f1c3

Please sign in to comment.